1.安装准备
(1)下载apache安装包
http://archive.apache.org/dist/httpd/
2.下载安装 apache 依赖关联包(共四个:apr,apr-iconv,apr-util,pcre)
http://archive.apache.org/dist/apr/
(1)安装apr
# tar zxvf apr-1.4.6.tar.gz
# cd apr-1.4.6
# ./configure
# make
# make install
(2)安装apr-iconv
# tar -zxvf apr-iconv-1.2.1.tar.gz
# cd apr-iconv-1.2.1
# ./configure --with-apr=/usr/local/apr
# make
# make install
(3)安装apr-util
# tar -zxvf apr-util-1.5.4.tar.gz
# cd apr-util-1.5.4
# ./configure --with-apr=/usr/local/apr
# make
# make install
(4)安装pcre
http://sourceforge.net/projects/pcre
# tar -zxvf pcre-8.37.tar.gz
# cd pcre-8.37
# ./configure
# make
# make install
3.安装apache
# tar -zxvf httpd-2.4.9.tar.gz
# cd httpd-2.4.9
# ./configure --prefix=/usr/local/apache2
# make
# make install
启动 apache
# /usr/local/web/apache/bin/apachectl start
关闭防火墙
# service iptables stop
在浏览器里输入:http://主机IP地址 就可以看到结果了
注意安装相关依赖包,根据步骤查看执行结果是否有错误。