一、yum安装基础包
yum install -y gcc expat-devel pcre-devel
二、安装apr
wget https://mirrors.aliyun.com/apache/apr/apr-1.6.5.tar.gz
tar zxvf apr-1.6.5.tar.gz
cd apr-1.6.5
./configure --prefix=/usr/local/apr
make
make install
三、安装apr-util
wget https://mirrors.aliyun.com/apache/apr/apr-util-1.6.1.tar.gz
tar zxvf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make
make install
四、 下载httpd-2.4.51.tar.gz
wget https://mirrors.aliyun.com/apache/httpd/httpd-2.4.51.tar.gz
tar -zxvf httpd-2.4.51.tar.gz
cd httpd-2.4.51
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
make
make install