编译安装环境
CentOS6.6、apache2.2.31
安装zilb、zlib-device
[root@test ~]# yum -y install zib
[root@test ~]# yum -y install zlib-devel
下载编译安装包并解压
[root@test ~]# wget -c http://apache.fayea.com/httpd/httpd-2.2.31.tar.gz
[root@test ~]# tar -zxvf httpd-2.2.31.tar.gz
编译安装
[root@test httpd-2.2.31]# cd httpd-2.2.31
[root@test httpd-2.2.31]# ./configure –prefix=/usr/local/apache2 –enable-rewrite –enable-so –enable-headers –enable-expires –with-mpm=worker –enable-modules=most –enable-deflate
[root@test httpd-2.2.31]# make && make install
设置httpd启动服务并启动
[root@test ~]# cp /usr/local/apache2/bin/httpd /etc/init.d/
[root@test ~]# service httpd -k start
[root@test ~]# netstat -lntp | grep 80
设置防火墙80端口允许访问
[root@test ~]# iptables -F
[root@test ~]# iptables -A OUTPUT -p tcp –sport 80 -j ACCEPT
查看版本
[root@test ~]# cd /usr/local/apache2/bin/
[root@test bin]# ./httpd -v apache