以下の構築は【個人ライセンス】を使用して説明します。
ダウンロードしたパッケージは、2006年09月11日時点で[MT-3_32-ja.zip]、サーバには「/root」パスにアップロードしてあり、既に『Webサーバの構築(Apache)』が完了し、CGIが「cgi-bin」で実行できる事を前提としています。
Movable Typeは以下のいずれかのデータベースを使用します。ここでは、MySQLを使用するものとして事前にインストールしておきます。
また、『ブログサーバ(Movable Type Ver 3.2)の構築』同様に「ImageMagick-perl」もインストールします。
MySQL-serverのインストール
# yum -y install mysql-server
ImageMagick-perlのインストール
# yum -y install ImageMagick-perl
MySQLの起動
# /etc/rc.d/init.d/mysqld start
MySQLを初めて起動した時は以下のメッセージとなります。
MySQL データベースを初期化中: Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
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 fedora.kajuhome.com password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
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 http://shop.mysql.com
[ OK ]
MySQL を起動中: [ OK ]
|
パッケージの展開
# unzip MT-3_32-ja.zip
Archive: MT-3_32-ja.zip
creating: MT-3.32-ja/
creating: MT-3.32-ja/php/
creating: MT-3.32-ja/php/lib/
inflating: MT-3.32-ja/php/lib/function.MTIndexLink.php
:
:
:
inflating: MT-3.32-ja/mt-config.cgi-original
inflating: MT-3.32-ja/mt-feed.cgi
inflating: MT-3.32-ja/mt-xmlrpc.cgi
inflating: MT-3.32-ja/index.html
inflating: MT-3.32-ja/mt-upgrade.cgi
展開したモジュールをCGI実行パスへ移動
# mv ./MT-3.32-ja/* /var/www/html/cgi-bin/
apacheプロセスで読み書き・実行できる様にオーナ・グループ変更
# chown -R apache:apache /var/www/html/cgi-bin/
生成するブログの公開先がドキュメントルート「/va/www/html/」にある場合は「html」の
オーナも「apache」である必要があります。(下記コマンドの方が無難かもしれません。)
# chown -R apache:apache /var/www/html/
ドキュメントルート「/var/www/html」直下に生成させる為、パーミッション変更
# chmod 777 /var/www/html
apacheの再起動
# /etc/rc.d/init.d/httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]
|
Webブラウザより『http://サーバアドレス/cgi-bin/mt-check.cgi』でアクセスすると下記画面が表示されます

ブログデータを保存するデータベースの初期設定を行います。
MySQLへログイン # mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.1.16 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 「mt」というデータベースを作成 mysql> create database mt; Query OK, 1 row affected (0.01 sec) 管理DBをデフォルト(管理をカレント) mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed Movable Typeがログインするユーザー名とパスワードを設定 以下は例として「ユーザー名:admin」「パスワード:password」としています。 このユーザー名とパスワードは、後述の「Movable Typeの設定」で必要となります。 mysql> grant usage on mt.* to admin@localhost identified by 'password'; Query OK, 0 rows affected (0.00 sec) 「mt」に対してすべての権限を「admin」に許す mysql> grant all on mt.* to admin@localhost; Query OK, 0 rows affected (0.00 sec) 終了 mysql> exit Bye |
Movable Type設定ファイルのコピー # cp -p /var/www/html/cgi-bin/mt-config.cgi-original /var/www/html/cgi-bin/mt-config.cgi 設定ファイルの編集 # vi /var/www/html/cgi-bin/mt-config.cgi ## Movable Type configuration file ## ## ## ## This file defines system-wide settings for Movable Type ## ## In total, there are over a hundred options, but only those ## ## critical for everyone are listed below. ## ## ## ## Information on all others can be found at: ## ## http://www.sixapart.jp/movabletype/manual/config ################################################################ ##################### REQUIRED SETTINGS ######################## ################################################################ # The CGIPath is the URL to your Movable Type directory Movable TypeのCGI実行パスを設定 CGIPath http://kajuhome.com/cgi-bin/ # 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パスを設定 StaticWebPath http://kajuhome.com/cgi-bin/mt-static #================ DATABASE SETTINGS ================== # REMOVE all sections below that refer to databases # other than the one you will be using. ##### MYSQL ##### 使用データベース「MySQL」の各種設定 ObjectDriver DBI::mysql データベース名 Database mt オール権限のユーザー名 DBUser admin 上記ユーザーのパスワード DBPassword password 自サーバのホストDB使用 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 |
Webブラウザより『http://サーバアドレス/cgi-bin/mt.cgi』でアクセスすると下記画面が表示されます。
















Webブラウザより『http://サーバアドレス/』でアクセスすると下記の様にブログ画面が表示されます。

Webブラウザより【http://サーバアドレス/cgi-bin/mt.cgi】で登録したユーザーでログインする





<div id="beta"> <div id="beta-inner" class="pkg"> <div class="module-calendar module"> <h2 class="module-header">Calendar</h2> <div class="module-content table"> <table summary="Monthly calendar with links to each day's posts"> <caption><$MTDate format="%B %Y"$></caption> <tr> <th abbr="Sunday">Sun</th> <th abbr="Monday">Mon</th> <th abbr="Tuesday">Tue</th> <th abbr="Wednesday">Wed</th> <th abbr="Thursday">Thu</th> <th abbr="Friday">Fri</th> <th abbr="Saturday">Sat</th> </tr> <MTCalendar> <MTCalendarWeekHeader><tr></MTCalendarWeekHeader> <td> <MTCalendarIfEntries> <MTEntries lastn="1"> <a href="<$MTEntryPermalink$>"><$MTCalendarDay$></a> </MTEntries> </MTCalendarIfEntries> <MTCalendarIfNoEntries> <$MTCalendarDay$> </MTCalendarIfNoEntries> <MTCalendarIfBlank> </MTCalendarIfBlank></td> <MTCalendarWeekFooter></tr></MTCalendarWeekFooter> </MTCalendar> </table> </div> </div> <div class="module-search module"> <h2 class="module-header">検索</h2> |


Webブラウザより『http://サーバアドレス/』でアクセスする

上記の様に、メインページにカレンダーが表示された。