安裝參考環境:apache
CentOS Linux release 7.5.1804 (Core)spa
httpd安裝的依賴包 # yum -y install pcre-devel # yum -y install openssl-devel # yum -y groupinstall "Development Tools" arp-util安裝的依賴包 # yum install expat-devel
# wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.7.0.tar.g # tar xf apr-1.7.0.tar.gz # cd apr-1.7.0 # ./configure -prefix=/usr/local/apr # make && make install
# wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz # tar xf 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
# wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.41.tar.gz # tar xf httpd-2.4.41.tar.gz # cd httpd-2.4.41 # ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event # make && make install
# /usr/local/apache/bin/apachectl start