#下载pcre最新版本的
Http://sourceforge.net/projects/pcre/files/pcre/
#下载apr and Apr-util The latest version (note, here is the download of two)
http://apr.apache.org/download.cgi
#下载httpd
http://mirror.bit.edu.cn/apache/httpd/
4 files
#注以上只给链接地址, you can choose the appropriate version, where the installation is the latest stable version
#安装编译工具
Yum install-y gcc gcc-c++
#解压4个文件
TAR-ZXVF apr-1.5.2.tar.gz tar-zxvf apr-util-1.5.4.tar.gz tar-zxvf pcre-8.37.tar.gz tar-zxvf httpd-2.4.18.tar.gz
#进入目录编译安装
CD apr-1.5.2./configure--prefix=/usr/local/aprmakemake Install
#进入apr-util-1.5.4 Directory
CD apr-util-1.5.4
#编译安装, you need to specify APR
./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/aprmakemake Install
#进入pcre目录
CD pcre-8.37
#编译安装
./configure--prefix=/usr/local/pcremakemake Install
#最后安装httpd -2.4.8
CD httpd-2.4.18
#编译安装
./configure--prefix=/usr/local/httpd--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-pcre=/ Usr/local/pcremakemake Install
#修改配置文件
Cd/usr/local/httpd/conf
#修改httpd the. conf file, remove the ServerName front # and replace it with the following:
ServerName localhost:80
#防火墙开80端口
Iptables-i input-p TCP--dport 80-j ACCEPT
#查看本机IP
Ifconfig
#浏览器打开: http://192.168.31.10 (write the IP address you see here)
IT Works!
#安装成功
This article is from the "itconf" blog, make sure to keep this source http://xiaomaomao.blog.51cto.com/2211235/1726330
Apache httpd-2.4.18 Installation Tutorial