Centos6编译安装httpd2.2.34

准备工作:
1.关闭防火墙:
centos6:service iptables stop;chkconfig iptables off
centos7:systemctl stop firewalld;systemctl distable fire walld
2.关闭SElinux
临时关闭:setenforce 0
永久关闭:vim /etc/selinux/config
SELINUX=disabled

1. 安装相应的开发包组及工具**

yum groupinstall "development tools" 
yum install openssl-devel**

2. 下载源码download src 网址:http://archive.apache.org/dist/httpd/ ,接着解压缩 **

tar xvf httpd-2.2.34.tar.bz2**

在这里插入图片描述

3. 先进入安装包目录下查看相关文档,不着急安装,cd httpd-2.2.34

cat README
cat INSTALL

4. ./configure --help获取其支持使用的选项,接着运行该脚本,根据Makefile.in文件生成Makefile(只有进入httpd-2.2.34这个目录下才能运行这个脚本)

./configure --prefix=/app --sysconfdir=/etc/httpd2 --enable-ssl
--prefix=/PATH: 指定默认安装位置,默认为/usr/local/,这里装在/app目录下
--sysconfdir=/PATH:配置文件安装位置,这里装在/etc/httpd2目录下
--enable-FEATURE[=ARG] 启用ssl功能

5.make 根据Makefile文件,构建应用程序

make -j 2

6. make install 复制文件到相应路径

make install

7. 二进制程序目录导入至PATH环境变量中

vim /etc/profile.d/env.sh
PATH=/app/bin:$PATH

8. . /etc/profile.d/env.sh

9. 启动服务

apachectl start
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值