# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir=/usr/local/jpeg9/ --with-png-dir=/usr/local/libpng2/ --with-gd --with-freetype-dir=/usr/local/freetype2/ --with-zlib-dir=/usr/local/zlib2/ --with-mysql=/usr/local/mysql --with-curl=/usr/local/curl --with-gettext=/usr/local/gettext --enable-sockets
# make && make install
# cp php.ini-development /usr/local/php/lib/php.ini
# ln -s /usr/local/php/bin/php /usr/bin
# vim /usr/local/apache2/conf/httpd.conf
在#AddType application/x-tar.tgz后追加:AddType application/x-httpd-php .php
在#LoadModule foo_module modules/mod_foo.so后追加:LoadModule php5_module modules/libphp5.so
在DirectoryIndexindex.html后面追加index.php