编译安装http2.4
作者:互联网
安装前准备:关闭防火墙和SELinux
#systemctl disable --now firewalld
#vim /etc/selinux/config
SELINUX=disabled
1.下载http2.4,下载地址:https://httpd.apache.org/download.cgi
2.编译环境依赖安装
yum -y install apr-devel apr-util-devel gcc pcre-devel openssl-devel redhat-rpm-config
3.上传文件并解压到指定文件
tar -zxvf httpd-2.4.54.tar.gz -C /usr/local/
cd /usr/local/httpd-2.4.54
4.编译并安装
./configure --prefix=/apps/httpd --sysconfdir=/etc/httpd --enable-ssl
make -j 2 && make install
5.配置环境
echo 'PATH=/apps/httpd/bin/:$PATH' > /etc/profile.d/httpd.sh
chmod 777 /etc/profile.d/httpd.sh
/etc/profile.d/httpd.sh
6.运行
apachectl start
测试结果:
标签:profile,httpd,etc,--,devel,编译,sh,http2.4,安装 来源: https://www.cnblogs.com/yangchenghua/p/16391820.html