centos 7 httpd-2.4.37.tar.gz安装

依赖包安装

yum -y install  gcc gcc-c++ make zlib zlib-devel openssl expat-devel  openssl-devel pcre pcre-devel

相关包下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/
apr-1.6.5.tar.gz
apr-util-1.6.1.tar.gz
httpd-2.4.37.tar.gz

安装arp

./configure --prefix=/usr/local/apr
#rm如果报错,修改configure文件,RM='$RM' 修改为RM='$RM -f'
make && make install

安装apr-util

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make && make install

安装httpd

./configure \
--prefix=/usr/local/apache/ \
--with-apr=/usr/local/apr/ \
--with-apr-util=/usr/local/apr-util/ \
--enable-so \
--enable-ssl\
--enable-alib\
--with-ssl\
--with--pcre\
--enable-deflate=shared \
--enable-expires=shared \
--enable-rewrite=shared \
--enable-static-support
make && make install

你可能感兴趣的:(centos 7 httpd-2.4.37.tar.gz安装)