mediawikiのインストール

sphinxはやっぱりメンドクサイのでwikiを入れる。

こないだpukiwikiが動かなかったのでmediawikiを入れてみる。

ファイルを wgetでダウンロードして解凍し、/var/www/html/ の下にフォルダを移す。

そして http://www.example.com/mediawiki-1.xx.xx/index.php をブラウザで開く。

するとひまわりの写真の下に Please set up the wiki first. というリンクが表示される。

「これをクリックするとセットアップできるのか、こりゃ便利だ」

と思ったら、500のエラー。

ログを見ると、

[Sun Jan 27 04:48:27 2013] [error] [client xx.xx.xx.xx] PHP Fatal error:  Class 'DOMDocument' not found in /var/www/html/wiki/includes/LocalisationCache.php on line 542,(以下略)


これはphp-domがないと出るエラーだそうだ。

php-domをyumで入れればいいのだが依存関係がどうたらで結局phpを入れなおしてから以下をやった。

# yum install php-xml
# yum install php-dom
# service httpd restart


その後、インストールスクリプトが動いたがDBにアクセスできないとかいろいろあってごちゃごちゃやったが何が必要十分なのかがよくわからない。最終的にインストールできたときのphpとmysqlのモジュールは以下のようになっている。

# rpm -qa|grep php
php-mbstring-5.3.3-14.el6_3.x86_64
php-xml-5.3.3-14.el6_3.x86_64
php-common-5.3.3-14.el6_3.x86_64
php-pdo-5.3.3-14.el6_3.x86_64
php-gd-5.3.3-14.el6_3.x86_64
php-cli-5.3.3-14.el6_3.x86_64
php-mysql-5.3.3-14.el6_3.x86_64
php-devel-5.3.3-14.el6_3.x86_64
php-5.3.3-14.el6_3.x86_64
php-mcrypt-5.3.3-1.el6.x86_64
php-pear-1.9.4-4.el6.noarch

# rpm -qa|grep mysql
compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-5.5.28-3.el6.remi.x86_64
mysql-devel-5.5.28-3.el6.remi.x86_64
mysql-libs-5.5.28-3.el6.remi.x86_64
mysql-server-5.5.28-3.el6.remi.x86_64
php-mysql-5.3.3-14.el6_3.x86_64