Centos6.8上如何源码安装apache

一. 首先安装编译工具:

// yum install gcc
//yum install gcc-c++
//yum install gcc-g77 

二. 前往官方站点下载源码包。

//  到/usr/local/src下进行下载
//  wget  http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.41.tar.gz 下载源码包。
//  tar -zxvf httpd-2.4.41.tar.gz  将压缩包解压。

三. 按照编译安装程序源码包的步骤进行安装。
步骤:

  • ./configure --prefix=安装路径–>指定安装路径
  • –with- =安装路径 -->关联其他软件。
  1. make 配置文件配置文件。
  2. make install 安装
  3. 启动。

具体安装过程。

  • 到 /usr/local/ httpd-2.4.41下执行 ./configure --prefix=/usr/local/apache
[root@fei httpd-2.4.41]# ./configure --prefix=/usr/local/apache
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... no
configure: error: APR not found.  Please read the documentation.

  • 通过最后一行错误提示,需要安装Apr。
    将apr下载到/usr/local/src下,进入安装apr
[root@fei src]# ls
apr-1.7.0                  httpd-2.4.41        
apr-1.7.0.tar.gz   httpd-2.4.41.tar.gz  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值