| アプリケーション・ディレクトリ | /home/httpd/cgi-bin/mt | 
| スタティック・ディレクトリ | /home/httpd/html/mt-static | 
| データベース・ディレクトリ(オプション) | - | 
| ブログ・ディレクトリ | /home/httpd/html/weblog | 
文字エンコーディングの決定
やっぱり UTF-8 かなぁ
新規インストール(Linux, BSD, Mac OS X)
MovableType の入手
MT-3_33-ja.zip を入手し、
/usr/local/src/mt で展開する
[root@hackkit root]# mkdir /usr/local/src/mt
[root@hackkit root]# cd /usr/local/src/mt
[root@hackkit mt]# ftp ほげほげ
(ファイルサーバに置いていた MT-3_33-ja.zip を ftp で get)
[root@hackkit mt]# unzip MT-3_33-ja.zip
	:
[root@hackkit mt]#
ディレクトリの作成
[root@hackkit mt]# mkdir /home/httpd/cgi-bin/mt
[root@hackkit mt]# mkdir /home/httpd/html/mt-static
[root@hackkit mt]# mkdir /home/httpd/html/weblog
[root@hackkit mt]#
ファイルのアップロード
[root@hackkit mt]# ls
MT-3.33-ja/  MT-3_33-ja.zip
[root@hackkit mt]# cd MT-3.33-ja/
[root@hackkit MT-3.33-ja]# ls
alt-tmpl/           index.html          mt-comments.cgi*        mt-static/       mt-wizard.cgi*  search_templates/
default_templates/  lib/                mt-config.cgi-original  mt-tb.cgi*       mt-xmlrpc.cgi*  tmpl/
extlib/             mt-add-notify.cgi*  mt-db2sql.cgi*          mt-testbg.cgi*   mt.cgi*         tools/
extras/             mt-atom.cgi*        mt-feed.cgi*            mt-upgrade.cgi*  php/
import/             mt-check.cgi*       mt-search.cgi*          mt-view.cgi*     plugins/
[root@hackkit MT-3.33-ja]# cd mt-static/
[root@hackkit mt-static]# ls
images/  mt.js*    mt_es.js  mt_ja.js  plugins/    styles_de.css  styles_fr.css  styles_nl.css
js/      mt_de.js  mt_fr.js  mt_nl.js  styles.css  styles_es.css  styles_ja.css
[root@hackkit mt-static]# tar cf - * |(cd /home/httpd/html/mt-static; tar xvf -)
	:
[root@hackkit mt-static]# cd ..
[root@hackkit MT-3.33-ja]# ls
alt-tmpl/           index.html          mt-comments.cgi*        mt-static/       mt-wizard.cgi*  search_templates/
default_templates/  lib/                mt-config.cgi-original  mt-tb.cgi*       mt-xmlrpc.cgi*  tmpl/
extlib/             mt-add-notify.cgi*  mt-db2sql.cgi*          mt-testbg.cgi*   mt.cgi*         tools/
extras/             mt-atom.cgi*        mt-feed.cgi*            mt-upgrade.cgi*  php/
import/             mt-check.cgi*       mt-search.cgi*          mt-view.cgi*     plugins/
[root@hackkit MT-3.33-ja]# tar cf - . |(cd /home/httpd/cgi-bin/mt/; tar xvf -)
(「mt-static以外」といわれても面倒なので、全部コピーしてしまう)
権限の設定
[root@hackkit MT-3.33-ja]# chmod 755 /home/httpd/cgi-bin/mt/*.cgi
[root@hackkit MT-3.33-ja]# chmod 777 /home/httpd/html/weblog
777 だなんて、いやだなぁ、、
環境設定ファイルmt-config.cgiの設定
良くわからないので、MySQL でセットアップする。
[root@hackkit mt]# diff -c mt-config.cgi-original mt-config.cgi
*** mt-config.cgi-original      2006-09-23 09:49:02.000000000 +0900
--- mt-config.cgi       2006-10-21 08:30:29.000000000 +0900
***************
*** 12,24 ****
  ################################################################
  # The CGIPath is the URL to your Movable Type directory
! CGIPath    http://www.example.com/cgi-bin/mt/
  # The StaticWebPath is the URL to your mt-static directory
  # Note: Check the installation documentation to find out
  # whether this is required for your environment.  If it is not,
  # simply remove it or comment out the line by prepending a "#".
! StaticWebPath    http://www.example.com/mt-static
  #================ DATABASE SETTINGS ==================
  #   REMOVE all sections below that refer to databases
--- 12,24 ----
  ################################################################
  # The CGIPath is the URL to your Movable Type directory
! CGIPath    http://192.168.1.35/cgi-bin/mt/
  # The StaticWebPath is the URL to your mt-static directory
  # Note: Check the installation documentation to find out
  # whether this is required for your environment.  If it is not,
  # simply remove it or comment out the line by prepending a "#".
! StaticWebPath    http://192.168.1.35/mt-static
  #================ DATABASE SETTINGS ==================
  #   REMOVE all sections below that refer to databases
***************
*** 26,46 ****
  ##### MYSQL #####
  ObjectDriver DBI::mysql
! Database DATABASE_NAME
! DBUser DATABASE_USERNAME
! DBPassword DATABASE_PASSWORD
  DBHost localhost
-
- ##### POSTGRESQL #####
- ObjectDriver DBI::postgres
- Database DATABASE_NAME
- DBUser DATABASE_USERNAME
- DBPassword DATABASE_PASSWORD
- DBHost localhost
-
- ##### SQLITE #####
- ObjectDriver DBI::sqlite
- Database /path/to/sqlite/database/file
-
- ##### BERKELEYDB #####
- DataSource  /path/to/database/directory
--- 26,32 ----
  ##### MYSQL #####
  ObjectDriver DBI::mysql
! Database mt
! DBUser mtuser
! DBPassword (パスワード)
  DBHost localhost
[root@hackkit mt]#
データベースの設定(MySQL)
[root@hackkit mt]# mysqladmin -uroot -pパスワード create mt
-bash: mysqladmin: command not found
[root@hackkit mt]#
あかんやん。MySQL インストールしてへん。
何をインストールする???ごそごそ
[root@hackkit mt]# apt-get install MySQL-server MySQL-client perl-DBD-MySQL
パッケージリストを読みこんでいます... 完了
依存情報ツリーを作成しています... 完了
以下の追加パッケージがインストールされます:
  perl-DBI
以下のパッケージが新たにインストールされます:
  MySQL-client MySQL-server perl-DBD-MySQL perl-DBI
アップグレード: 0 個, 新規インストール: 4 個, 削除: 0 個, 保留: 2 個
12.6MB のアーカイブを取得する必要があります。
展開後に 23.5MB のディスク容量が追加消費されます。
続行しますか? [Y/n]y
取得:1 http://updates.vinelinux.org 3.1/ppc/plus MySQL-server 4.0.25-0vl0 [8683kB]
取得:2 http://updates.vinelinux.org 3.1/ppc/plus MySQL-client 4.0.25-0vl0 [3195kB]
取得:3 http://updates.vinelinux.org 3.1/ppc/plus perl-DBI 1.40-0vl1 [505kB]
取得:4 http://updates.vinelinux.org 3.1/ppc/plus perl-DBD-MySQL 1.2219-0vl2 [241kB]
12.6MB を 1m22s 秒で取得しました (153kB/s)
変更を適用しています...
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [ 25%]
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
061021  8:35:52 /usr/sbin/mysqld: Shutdown Complete
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h hackkit password 'new-password'
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
   2:MySQL-client           ########################################### [ 50%]
   3:perl-DBI               ########################################### [ 75%]
   4:perl-DBD-MySQL         ########################################### [100%]
完了
[root@hackkit mt]#
[root@hackkit mt]# /etc/rc.d/init.d/mysql start
[root@hackkit mt]# mysqladmin -uroot -pパスワード create mt
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
[root@hackkit mt]#
あくせすでないど?
パスワードを指定しないでやってみる
[root@hackkit mt]# mysqladmin -uroot create mt
できた?
[root@hackkit mt]# mysqladmin -uroot create mt
mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'mt'. Database exists'
できてそう。
ユーザーを作成する
[root@hackkit mt]# mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.0.25-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant select,insert,update,delete,create,index,alter on mt.* to mtuser@localhost identified by 'mtpasswd';
Query OK, 0 rows affected (0.01 sec)
mysql> quit
Bye
[root@hackkit mt]#
パスワードもつけておく
システム・チェックの実行
http://192.168.1.35/cgi-bin/mt/mt-check.cgi にアクセスする。
「ページを表示できません。」
だー。httpd 動かしていない。
[root@hackkit mt]# /etc/rc.d/init.d/httpd start
httpdを起動中:                                             [  OK  ]
[root@hackkit mt]#
再度、http://192.168.1.35/cgi-bin/mt/mt-check.cgi にアクセスする。
「準備が整いました。 サーバーには必要なモジュールがすべて揃っています。
追加のモジュールのインストールは必要ありません。
インストールの説明に従って、次の手順に進んでください。」
だと。
システム管理者の登録
http://192.168.1.35/cgi-bin/mt/mt.cgi にアクセスして設定する。
これで、Movable Type のインストール・セットアップが完了
ブログの新規作成
メインメニューからブログの新規作成を選択。
| ブログ名 | てすと | 
| サイトURL | http://192.168.1.35/weblog | 
| サイト・パス | /home/httpd/html/weblog | 
| 時間帯(タイムゾーン) | UTC+9 | 
再構築
42 秒!
空の状態でこれ。今後どうなる?
Copyright (C) 2006 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市