MovableType 4.21-jaのインストール | ウェブサイト制作のためのメモ帳

MovableType 4.21-jaのインストール

1.mt○○○.cgiの1行目のパスを環境に合わせて変更
#!/usr/bin/perl -w
↓(必要ないなら変更しない)
#!/usr/local/bin/perl -w

2.mt-config.cgi-originalをコピーしてファイル名をmt-config.cgiにする

3.ファイルをすべてアップロードしてcgiのパーミッション(属性)を755に変更

4.mt-check.cgiにアクセスして必要なものが全部揃ってるかチェック
 インストールしてないものがあったらインストールする

5-a.mt.cgiにアクセス
 あとは必要項目入れて完了(勝手にmt-config.cgiが変更される)

(以下mt.cgiにアクセスしたらDBI_DRIVERのエラーがでて進めない場合)
5-b.mt-config.cgiの内容を自分で変更する(変更したらアップロード)
# 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
# other than the one you will be using.
##### 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

##### MAIL #####
MailTransfer smtp
SMTPServer smtp.hoge.com

##### Charset #####
PublishCharset Shift_jis

##### TempDir #####
TempDir C:\Windows\Temp


緑の部分を変更、使わないDBはコメントアウトか削除する
MAIL、Charset、TempDirなどは必要なら付ける(下記リンク参照)
文字コードはShift_jisじゃないと日本語ファイルをアップロードした時文字化けする
しかし、euc-jpかutf-8の方が好み

上に記述したデータベース名のデータベースを作成(phpmyadminとかで作ると簡単)
mt.cgiにアクセス
必要項目入力して完了

参考サイト
Movable Type 4 ドキュメントのMovable Type インストールガイド(sixapart)
Movable Type 4 ドキュメント環境設定ファイル mt-config.cgi の設定(sixapart)