1. 下载源码:
cd /usr/local/src/
wgethttp://mirrors.cnnic.cn/apache/httpd/httpd-2.4.12.tar.bz2
wgethttp://mirrors.cnnic.cn/apache/apr/apr-1.5.2.tar.bz2
wgethttp://mirrors.cnnic.cn/apache/apr/apr-util-1.5.4.tar.gz
2. 安装apr
tar jxvf apr-1.5.2.tar.bz2
cd apr-1.5.2
./configure --prefix=/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 --prefix=/usr/local/apr-util--with-apr=/usr/local/apr/
4. 安装httpd
yum installgccmake cmakepcre-devel
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
make && make install
原文链接:https://www.f2er.com/centos/379566.html