码迷,mamicode.com
首页 > Web开发 > 详细

Apache 源码包安装

时间:2016-04-16 19:46:34      阅读:337      评论:0      收藏:0      [点我收藏+]

标签:linux   apache   

cd /usr/local/src/

wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.2.31.tar.gz

tar zvf httpd.tar.gz

cd httpd

yum install -y gcc zlib-devel

 ./configure \

--prefix=/usr/local/apache2 \

--with-included-apr \

--enable-so \

--enable-deflate=shared \

--enable-expires=shared \

--enable-rewrite=shared \

--with-pcre

make

make install


/usr/local/apache2/bin/apachectl start|stop|restart|graceful 重新加载配置,服务不会停止

查看配置文件是否正确

/usr/local/apache2/bin/apachectl -t

httpd: Could not reliably determine the server‘s fully qualified domain name, using 202.102.110.203 for ServerName

Syntax OK


配置文件路径

/usr/local/apache2/conf/httpd.conf


查看静态模块

/usr/local/apache2/bin/apachectl -l 

静态模块路径,启动时已加载

du -sh /usr/local/apache2/bin/httpd


查看所有模块

/usr/local/apache2/bin/apachectl -M

动态模块路径

ls /usr/local/apache2/modules/

httpd.exp  mod_deflate.so  mod_expires.so  mod_rewrite.so


工作模式设定,版本默认区别,work prefork

./configure --help | grep mpm

  --with-mpm=MPM          Choose the process model for Apache to use.

                          MPM={beos|event|worker|prefork|mpmt_os2|winnt}








Apache 源码包安装

标签:linux   apache   

原文地址:http://fishboy84.blog.51cto.com/1816326/1764371

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!