CentOS源码安装Apache2.2.17

#安装需要的库
yum -y install zlib-devel

cp /home/root/httpd-2.2.17.tar.gz /usr/local/src
cd /usr/local/src
tar xzvf httpd-2.2.17.tar.gz

./configure --prefix=/usr/local/apache2 --enable-so --enable-threads --with-mpm=worker --enable-cache --enable-rewrite=shared -enable-deflate=shared --enable-expires=shared

make
make install

 

#启动apache
/usr/local/apache2/bin/apachectl start
#若出现notice如httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
vi /usr/local/apache2/conf/httpd.conf
修改ServerName那行为:ServerName localhost:80
/usr/local/apache2/bin/apachectl restart

你可能感兴趣的:(apache,centos,cache)