MTインストール(さくらインターネット)

私が今使用しているレンタルサーバー・さくらインターネットでの
MTインストール方法をメモ書き。
いやー最近よく参考元のページ消えてしまうので・・(TдT)
参考元
MovableType 備忘録MovableType3.3をインストールする


MTをDL
DLしたファイルを解凍
1、mt-config.cgi-original ファイルの編集

14行目
# The CGIPath is the URL to your Movable Type directory
CGIPath http://www.example.com/cgi-bin/mt/

自分のblogに合わせてCGIPathを変更する。
(MTを置くフォルダー名を変えた場合はそれに合わせて変更する。)

17行目
# 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

StatickWebPathをBlogにあわせて変更する。

27行目?
##### 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

データベースの設定。
自分のBlogで使用するデータベースを選択肢、それ以外は行頭に#をつけて
コメントアウトする。

コメントアウト例(MySQLをコメントアウト)
##### MYSQL #####
#ObjectDriver DBI::mysql
#Database DATABASE_NAME
#DBUser DATABASE_USERNAME
#DBPassword DATABASE_PASSWORD
#DBHost localhost

本エントリーでは、SQLiteを使用しての説明をしていきますので
SQLiteの項目以外のデータベースの項目を#でコメントアウトします。

41行目
##### SQLITE #####
ObjectDriver DBI::sqlite
Database /path/to/sqlite/database/file

Database(データの保存先)のパスを以下のように変更する。
Database ./db
1?2、ファイルに以下を追加

# When rebuilding individual archives, Movable Type splits up the rebuilding
# process into segments, where each segment consists of rebuilding N entries.
# The default value for N is 40, so by default, MT will rebuild 40 entries at
# a time, then move on to the next 40, etc. You can change that value globally
# here; for example, if you have a very stable server, you might wish to just
# get it all done with in one batch.
#
EntriesPerRebuild 40
# When sending pings–either TrackBack pings or update pings–Movable Type
# sets a timeout on the ping, so that it doesn’t take too long and appear to
# freeze up the system. You can override the default setting of 15 seconds
# by setting a different value with the PingTimeout directive. The value
# is assumed to be in seconds.
#
# The MovableType 3.3(default 60 seconds.)
#
PingTimeout 60
# OneHourMaxPings and OneDayMaxPings settings allow you to limit the maximum
# number of TrackBack pings that you will accept in the period of either one hour or
# one day, respectively. In fact, the latter limit applies to the period which is 4000
# times as long as the ThrottleSeconds value, which defaults to 20. Thus, by
# adjusting the ThrottleSeconds value, you can change the amount of time during
# which the OneDayMaxPings setting applies.
#
# A higher-than-usual rate of incoming TrackBack pings can be indicative of malicious
# behavior. These settings give you a measure of protection against such behavior.
#
OneDayMaxPings 50
# OneHourMaxPings and OneDayMaxPings settings allow you to limit the maximum
# number of TrackBack pings that you will accept in the period of either one hour or
# one day, respectively. In fact, the latter limit applies to the period which is 4000
# times as long as the ThrottleSeconds value, which defaults to 20. Thus, by
# adjusting the ThrottleSeconds value, you can change the amount of time during
# which the OneDayMaxPings setting applies.
#
# A higher-than-usual rate of incoming TrackBack pings can be indicative of malicious
# behavior. These settings give you a measure of protection against such behavior.
#
OneHourMaxPings 10
# Default is 0. Enables IP display in commenter/trackback listings. This directive also
# enables the IP banning panel under the weblog’s Settings screen.
#
ShowIPInformation 1
DeleteFilesAtRebuild 1
DebugMode 0

各項目の説明
EntriesPerRebuild 40
一度に再構築出来るエントリーの指定。
個別・アーカイブの再構築に失敗する場合はこの値を下げると改善される可能性がある。
PingTimeout 60
トラックバックのタイムアウト(秒)を指定。トラックバックでエラーが起こる場合は
この値を伸ばすと改善される可能性がある。
OneDayMaxPings 50
1日以内に受けられるtラックバック数の指定
OneHourMaxPings 10
1時間以内に受けられるトラックバック数の指定
ShowIPInformation 1
特定のIPAddressからのコメントやトラックバックを禁止する機能を有効にするかどうかの設定。
0=OFF 1=ON
DeleteFilesAtRebuild 1
記事の削除時に残ったファイルを削除してくれる機能を有効にするかどうかの設定。
0=OFF 1=ON
DebugMode 0
デバッグ用のメッセージを表示させる機能を有効にするかどうかの設定。
0=OFF 1=ON
1?3、ファイルに以下を追加

DBUmask 0022
HTMLUmask 0022
UploadUmask 0022
DirUmask 0022

さくらインターネット・ロリポップのレンタルサーバーではsuexecというセキュリティに優れた
CGIを実行するプログラムを使用している為、この設定が必要となります。
1?4、ファイルに以下を追加

HTMLPerms 0777
UploadPerms 0777

さくらインターネットではMTで再構築して出来たPHPファイルが自動的にパーミッションの変更が
されないのでこの設定が必要なようです。
以上の変更が終了したら、名前を変更し保存します。
変更前:mt-config.cgi-original
変更後:mt-config.cgi
2、データベース保護用のファイルを製作
データベースの中身を見られないように処理します。
メモ帳やテキストエディター等を開き下記の内容のフィルを作成。

<Files *>
<Limit GET>
deny from all
</Limit>
</Files>

ファイル名を htaccess.txt として保存します。
MTのファイルが入っているフォルダー(MT-3.33-jaとかになってるはず)の名前を
mtに変更。
*お好きな名前でも構いませんが、変更時には項目1で変更したCGIPath等の変更を忘れずに!*
3、ファイルのアップロード
mt-config.cgiのCGIPathmtで設定した場所にmtフォルダーをPASVモードでアップロード。
例)CGIPathを http://hoge.ufu.jp/mt/ とした場合はホームディレクトリ上にそのままmtフォルダーを
アップロードすればOKです。
アップロードにはかなりの時間が掛かります。
アップロードが終了したら、mtフォルダー内の拡張子cgiのパーミッションを
755(rwxr-xr-r)に変更します
続いて、mt/mt.cgiが置いてある階層にdbという名前でフォルダーを作成。(重要)
例)http://hoge.ufu.jp/mt/db/
dbフォルダーの中に項目2で作成したhtaccess.txtをアップロードします。
アップロードしたhtaccess.txtの名前を .htaccess に変更。
4、MTの設定
ブラウザーでmt-check.cgiを実行します。
例)http://hoge.ufu.jp/mt/mt-check.cgi
実行したページの最後に
Movable Typeのシステム・チェックは、無事に完了しました
という文章が表示されれば、動作確認は成功です。
文章が表示されない、もしくはエラーが出る場合はmt-config.cgiで設定した項目を
もう一度見直すか、パーミッション等の変更忘れが無いか等確認を。
5、MTのインストール
ブラウザーでmt.cgiを実行します。
例)http://hoge.ufu.jp/mt/mt.cgi
実行すると、登録画面が表示されるので「ログイン名」と「パスワード」を設定。
「インストールを続行」ボタンを押すとインストールが実行されます。
インストールが終了すると、画面に
Movable Typeにログインしてください
というボタンが出ますのでそれを押して、先ほど設定したログイン名とパスワードを
入力すればログインすることが出来ます
あとは画面に沿って設定をしていけばOK

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です


The reCAPTCHA verification period has expired. Please reload the page.

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)