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  

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/59275.html