php+Apache
php+ApacheをRHで作成。Apacheをインストールしてからphpをインストールする手順。
Apacheをインストール
http://httpd.apache.orgからApache2.2.10をダウンロード。phpはモジュールで組み込むのでsoをenableしておく。
$ ./configure --enable-so --enable-proxy --enable-ssl --enable-dav --enable-rewrite $ make # make install
PHPをインストール
PHP5の最新5.2.6をダウンロード。configureでapacheのapxsを指定する。
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbregex $ make # make install
apachectlでエラーがでたら
apachectlでこんなエラーがでることが。
/etc/httpd/modules/libphp5.so: undefined symbol: sapi_globals
とか。別のシンボルの場合もあるみたい。こうなった場合はphpをmake distcleanして再makeすると幸せになれる。