CentOS-4でのAjaXplorerを使うための下準備。
普通はrpmのphp-4を削除してソースからphp-5をインストールする必要があるが、今までrpmのphp4で運用してきたので、php-5はCGI版でインストールしたいと思った。
ついでにphp-mcryptもインストールする。
■下準備
/etc/ld.so.confの変更
/usr/local/lib・・・・ 1行追加
ldconfig実行
libmcryptが必要
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make
make install
tar zxvf php-5.2.12.tar.gz
cd php-5.2.12
./configure \
–with-config-file-path=/usr/local/lib/php5-cgi \
–with-mcrypt=/usr/local \
–enable-force-cgi-redirect \
–enable-fastcgi \
–program-suffix=5 \
–enable-cgi \
–without-pear \
–with-libdir=lib64 \
–with-mysql=/usr/lib64 \
–enable-mbstring \
–enable-mbregex \
–enable-zend-multibyte \
–with-zlib \
–with-gd \
–with-jpeg-dir \
–with-png-dir \
–enable-gd-native-ttf \
–enable-gd-jis-conv \
–enable-exif \
–enable-sockets \
–enable-soap \
–with-gettext \
–with-ldap \
cp php.ini-recommend /usr/local/lib/php5-cgi/php.ini
■Apacheの設定
httpd.conf
VirtualHostディレクティブ
ScriptAlias /php5-cgi /usr/local/bin/php-cgi5
<Location /home/username/pub/htdocs>
AlloOverride None
Options ExecCGI
Action php5-cgi /php5-cgi
AddHandler php5-cgi php
</Location>
apachectl configtest
apachectl graceful
うまく行った。
しばらくうまくいかず、サーバーがずっとうなっていた。