重点参考文章:https://blog.csdn.net/MrDing991124/article/details/78829184 写的很详细了,自己按着改博文走了不遍,不错!
太晚,先回去吃饭!!!!
一、配置安装环境
1、下载所需的安装包
由于httpd2.2和httpd2.4所所使用的Apr库不同,而且centos7系统自带的Apr与之不匹配,所以需要使用yum安装Apr库文件。
yum -y install zlib zlib-devel gcc* ?expat-devel pcre-devel libxml2-devel[root@agent src]#pwd/usr/local/src[root@agent src]#wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.gz ??//2.4源码包[root@agent src]#wget ?http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz ??????//apr-1.6.3r包[root@agent src]#wget ?http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz ?//apr-util-1.6.1包
2、逐一安装这三个软件包
2.1、安装apr
[root@agent src]#tar xf apr-1.6.3.tar.gz[root@agent src]#cd apr-1.6.3/[root@agent apr-1.6.3]#./configure --prefix=/usr/local/apr[root@agent apr-1.6.3]#make[root@agent apr-1.6.3]#make install[root@agent apr-1.6.3]#echo $?0
注意: APR 1.6.2版本有变更,进行了加密设置,进行编译时需要使用如下命令(否则在安装Apache是无法调用该库文件)
[root@agent apr-1.6.3]#CC="gcc -m64" ./configure --prefix=/usr/local/apr
2.2、安装Apr-util包
[root@agent src]# cd apr-util-1.6.1[root@agent apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr[root@agent apr-util-1.6.1]# echo $?0编译和安装:[root@agent apr-util-1.6.1]# make && make install
2.3、安装httpd
./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --prefix=/usr/local/apache --sysconfdir=/etc/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-mpm=prefork --enable-modules=most --enable-mpms-shared=all --enable-module=so --enable-info
https://www.cnblogs.com/kevingrace/p/7075513.html?utm_source=itdadao&utm_medium=referral
Centos7 apache2.4.29(httpd) 安装
原文地址:https://www.cnblogs.com/huangyanqi/p/9168637.html