Apache的安装,请参见本Blog中的WebServer's posts

1.下载php
    ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
    make
    make install
    
    cp php.ini-development /usr/local/lib/php.ini
2.打开/usr/local/apache2/conf/httpd.conf
    检查php5_module是否已清除前面的注释
    
    让Apache可以解析PHP
    <FilesMatch "\.ph(p[2-6]?|tml)$">
    SetHandler application/x-httpd-php
    </FilesMatch>