WordPress を入れてみよう http://wordpress.xwd.jp/ 日本語パッケージはこちら http://wordpress.xwd.jp/local/ ARTIFACT のひと http://artifact-jp.com/mt/archives/200307/wordpress.html ! 環境 rin@sakura[~]% uname -a Linux sakura 2.4.27 #2 SMP 2004年 8月 9日 (月) 18:23:11 JST i686 unknown rin@sakura[~]% echo $DISTRIBUTION $DISTVER plamo 2.2 ! 必要なもの PHP 4 以上 MySQL 3.23.23 以上 ! PHP を入れる * configure rin@sakura[~/cmp/php-5.0.3]% ./configure --with-mysql : Configuring extensions checking whether to enable LIBXML support... yes checking libxml2 install dir... no configure: error: xml2-config not found. Please check your libxml2 installation. ! libxml2 を入れる http://xmlsoft.org/ rin@sakura[~/cmp]% wget ftp://xmlsoft.org/libxml2-cvs-snapshot.tar.gz rin@sakura[~/cmp]%tar xzf libxml2-cvs-snapshot.tar.gz rin@sakura[~/cmp]%cd libxml2-2.6.16/ rin@sakura[~/cmp/libxml2-2.6.16]% ./configure && make && make tests rin@sakura[~/cmp/libxml2-2.6.16]% su bash-2.04# make install ! ふたたび PHP rin@sakura[~/cmp/php-5.0.3]% ./configure --with-mysql : configure: error: Cannot find MySQL header files under yes. Note that the MySQL client library is not bundled anymore. --with-mysql なのだから先に MySQL 入れる必要があるんだな笑 ! MySQL ここ参照。 http://www.mysql.gr.jp/Manual/mysql-4.00.12/manual.ja_Installing.html#Installing_source user mysql と group mysql を追加。 bash-2.04# groupadd mysql bash-2.04# useradd -g mysql mysql rin@sakura[~/cmp/mysql-4.0.23]% ./configure --prefix=/usr/local/mysql rin@sakura[~/cmp/mysql-4.0.23]% make rin@sakura[~/cmp/mysql-4.0.23]% su bash-2.04# make install bash-2.04# ./scripts/mysql_install_db bash-2.04# chown -R root /usr/local/mysql bash-2.04# chown -R mysql /usr/local/mysql/var bash-2.04# chgrp -R mysql /usr/local/mysql bash-2.04# cp support-files/my-medium.cnf /etc/my.cnf bash-2.04# /usr/local/mysql/bin/mysqld_safe --user=mysql & [1] 27521 bash-2.04# Starting mysqld daemon with databases from /usr/local/mysql/var STOPPING server from pid file /usr/local/mysql/var/sakura.pid 041226 11:19:18 mysqld ended [1]+ Done /usr/local/mysql/bin/mysqld_safe --user=mysql bash-2.04# 終了した...。いいのか? !! インストール後の設定とテスト ここ参照。 http://www.mysql.gr.jp/Manual/mysql-4.00.12/manual.ja_Installing.html#Post-installation bash-2.04# ./scripts/mysql_install_db bash-2.04# cd /usr/local/mysql/ bash-2.04# /usr/local/mysql/bin/mysqld_safe --user=mysql & ! WordPress げっと。 rin@sakura[~/cmp]% wget http://wordpress.org/latest.tar.gz rin@sakura[~/cmp]% tar xzf latest.tar.gz rin@sakura[~/cmp]% mv wordpress ~/public_html/wp rin@sakura[~/cmp]% cd public_html/ rin@sakura[~/public_html]% chmod -R 777 wp !! 日本語化? rin@sakura[~/cmp]% wget http://wordpress.xwd.jp/files/language-pack-2005-01-21.zip rin@sakura[~/cmp]% unzip language-pack-2005-01-21.zip rin@sakura[~/cmp/wordpress]% cp -R * ~/public_html/wp/ ! PHP ようやっと PHP のインストール PHP http://www.php.gr.jp/ Apache2 で使う場合 http://www.php.net/manual/ja/install.unix.apache2.php rin@sakura[~/cmp/php-4.3.10]% ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql bash-2.04# make bash-2.04# make install bash-2.04# cp php.ini-dist /usr/local/lib/php.ini ! 問題 index.php にアクセスすると internal server error になる。 これか。 http://jp2.php.net/manual/ja/faq.build.php#faq.build.not-running 10. インストール手順に完全に基づきUNIX上でApacheモジュール版をインストールしましたが、ブラウザでアクセスするとPHPスクリプトが表示され、ファイルを保存しますかと尋ねられます。 これは、何らかの理由によりPHPモジュールが起動していないことを意味しています。助けを求める質問を行う前にまず以下を確認下さい。 実行しているhttpdバイナリが構築したばかりの新しいhttpdバイナ リであることを確認して下さい。確認を行うには以下のように入力します。 /path/to/binary/httpd -l mod_php4.c がリストの中にない場合、正し いバイナリが実行されていません。正しいバイナリを見つけて、インストールして下さい。 bash-2.04# bin/httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c mod_proxy.c proxy_connect.c proxy_ftp.c proxy_http.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_so.c bash-2.04# bin/httpd -l | grep php bash-2.04# ない。 以下の手順にしたがい apache を再構築する。 http://jp2.php.net/manual/ja/install.unix.apache2.php ./configure --enable-so PHP はこう ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql httpd.conf に以下を追加。 LoadModule php4_module libexec/libphp4.so AddType application/x-httpd-php .php .phtml !! PHP のテスト こんな test.php を用意する。