手动安装apache2 httpd 2.2.19<本人用的是:httpd-2.2.21>
下载地址: http://httpd.apache.org/download.cgi
echo 复制下面整段shell到命令行终端中,会自动逐条执行。
sudo apt-get remove apache2 apache2.2-common apache2-utils apache2.2-bin
sudo rm -rf /etc/apache2/
sudo rm /etc/init.d/apache2
tar -jxvf httpd-2.2.19.tar.bz2
cd httpd-2.2.19
./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
make
sudo make install
sudo /usr/local/apache2/bin/apachectl start
添加服务 让apache2开机自动启动
sudo cp /usr/local/apache2/bin/apachectl /etc/init.d/apache2
sudo update-rc.d apache2 defaults
转贴:http://www.haogongju.net/art/627380