卸载系统自带的apache
1
2
3
|
rpm -qa |
grep
httpd
yum remove httpd
rpm -e --nodeps httpd.2.2.3……
|
官网下载apache
1
2
3
4
5
|
mkdir
-p
/home/darren/tools
cd
/home/darren/tools/
wget http:
//mirrors
.cnnic.cn
/apache//httpd/httpd-2
.2.31.
tar
.gz
tar
zxf httpd-2.2.31.
tar
.gz
cd
httpd-2.2.31
|
编译:
1
2
3
4
5
6
7
8
9
10
11
|
.
/configure
\
--prefix=
/usr/local/apache/
\
--
enable
-deflate \
--
enable
-expires \
--
enable
-headers \
--
enable
-modules=most \
--
enable
-so \
--with-mpn=worker \
--
enable
-rewrite
make
&&
make
install
|
-------------------------------------------------------------------------
查看apache编译安装了哪些模块:
1
|
bin
/apachectl
-l
|
启动apache服务:
1
|
/bin/apachectl
start
|
查看启动端口:
1
2
|
netstat
-lntp
lsof
-i tcp:80
|
本文转自 王家东哥 51CTO博客,原文链接:http://blog.51cto.com/xiaodongge/1919349