下载安装包
wget https://downloads.apache.org/httpd/httpd-2.4.43.tar.gz
wget https://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.7.0.tar.gz
wget https://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
编译安装依赖
* apr
tar zxf apr-1.7.0.tar.gz
cd apr-1.7.0/
./buildconf
./configure --prefix=$INSTALL_PATH/apr
make -j 2 && make install
* apr-util
yum install expat-devel
tar zxf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
./configure --prefix=$INSTALL_PATH/apr-util --with-apr=$INSTALL_PATH/apr
make -j 2 && make install
* tar zxf httpd-2.4.43.tar.gz
cd httpd-2.4.43/
cp -rapr-1.7.0/ httpd-2.4.43/srclib/apr
cp -r apr-util-1.6.1 httpd-2.4.43/srclib/apr-util
./configure --prefix=$INSTALL_PATH/apache --enable-so --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=$INSTALL_PATH/apr --with-apr-util=$INSTALL_PATH/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork --with-included-apr
make -j 2 && make install
apache/bin/httpd -k start -f apache/conf/httpd.conf