CentOS 7上编译安装 apache 2.4.25
在CentOS 7上编译安装 apache 2.4.25 源码包,并启动此服务.配置环境
[*]Systemctl disable firewalld
[*]Systemctl stop firewalld
[*]/etc/selinux/config 关闭selinux
[*]Sed –i‘s/SELINUX=enforcing/SELINUX=disable/’ /etc/selinux/config 重启生效(getenforce查看是否生效)
[*]yum install gcc apr-devel apr-util-devel pcre-devel openssl-devel
[*]wgethttp://archive.apache.org/dist/httpd/httpd-2.4.25.tar.bz2 下载apache源码包
[*]tar –xvf httpd-2.4.25.tar.bz2
[*]cd httpd-2.4.25.tar.bz2
[*]./configure –prefix=/app/httpd --sysconfdir=/etc/httpd –enable-ssl 预编译config配置选择安装路径 配置文件路径
[*]make && make install 编译安装
[*]echo 'PATH=/app/httpd/bin:$PATH' > /etc/profile.d/httpd.cdsh 添加全局环境变量执⾏命令写⼊PATH
[*]. /etc/profile.d/httpd.sh 生效新加路径的环境变量
[*]apachectl start启动apachectl服务
[*]
页:
[1]