CentOS7编译安装httpd-2.4.41

安装参考环境:

  CentOS Linux release 7.5.1804 (Core)

 

一、安装依赖包

httpd安装的依赖包
# yum -y install pcre-devel                  
# yum -y install openssl-devel 
# yum -y groupinstall "Development Tools"  

arp-util安装的依赖包
# yum install expat-devel     

二、编译安装apr-1.7.0

# 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

三、编译安装apr-util-1.6.1

# 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

四、编译安装httpd-2.4.41

# 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

五、启动httpd

# /usr/local/apache/bin/apachectl start

       

原文地址:https://www.cnblogs.com/ysuwangqiang/p/11445487.html