卸载系统自带的apache
rpm -qa |grep httpd yum remove httpd rpm -e --nodeps httpd.2.2.3……
官网下载apache
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
编译:
./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编译安装了哪些模块:
bin/apachectl -l
启动apache服务:
/bin/apachectl start
查看启动端口:
netstat -lntp lsof -i tcp:80