安装apache2
1. ./configure --enable-rewrite
2. make
3. make install
安装php5
1.
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-zlib --enable-sockets
2.make
3.make install
4.cp php.ini-dist /usr/local/lib/php.ini
5.
vi /usr/local/apache2/conf/httpd.conf 6.LoadModule php5_module modules/libphp5.so ,打开这一行注释
7.AddType application/x-httpd-php .php, 添加这一行
8.DirectoryIndex index.html index.php, 添加index.php
9.找到DocumentRoot "/usr/local/apache2/htdocs" , 把/usr/local/apache2/htdocs改为你存放网页文件的路径