centos 编译安装 lamp

编译安装 apache 
# tar zxvf httpd-2.2.6.tar.gz
# cd httpd-2.2.6
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-track-vars --enable-proxy --enable-vhost-alias --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite --enable-mods-shared=all
# make
# make install

wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.2.19.tar.bz2
tar -jxvf httpd-2.2.19.tar.bz2
cd httpd-2.2.19
sudo yum install gcc
./configure --prefix=/opt/httpd --enable-so --enable-rewrite
make
sudo make install
sudo /opt/httpd/bin/httpd -k start

安装完apache,用浏览器访问http://localhost,能正常显示说明装好了。

原文地址:https://www.cnblogs.com/mazefeng/p/3359277.html