Apache2 PHP4インストール
httpd
./configure --enable-dav --enable-dav-fs --enable-rewrite --enable-so --with-mpm=worker
$ make
# make install
自動起動設定
/etc/rc.d/init.d/httpd
を作成
内容:
#!/bin/bash
#
# Startup script for Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /usr/local/apache2/conf/httpd.conf
# See how we were called.
case "$1" in
start)
/usr/local/apache2/bin/apachectl start
;;
stop)
/usr/local/apache2/bin/apachectl stop
;;
status)
/usr/local/apache2/bin/apachectl status
;;
restart)
/usr/local/apache2/bin/apachectl restart
;;
graceful)
/usr/local/apache2/bin/apachectl graceful
;;
*)
echo "Usage: $0 {start|stop|restart|graceful|status}"
exit 1
esac
exit 0
chkconfig でランレベルを設定
chkconfig --add httpd
/usr/local/apache2/conf/httpd.conf を修正
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
PHP
./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-roxen-zts --enable-zend-multibyte --with-mysql --enable-track-vars --enable-mbstring --enable-mbregex --with-gd --with-png-dir=shared --with-jpeg-dir=shared --with-zlib-dir=shared --with-zlib
$ make
# make install
# cp php.ini-dist /usr/local/lib/php.ini
/usr/local/lib/php.iniを修正
mbstring.language = Japanese