部署经典黄金架构LAMP----编译安装apache----3

编译安装apache-----apr

1、根据上一个文档我们继续搭建

[root@localhost local]# cd software/

安装apr工具包

 [root@localhost software]# wget https://archive.apache.org/dist/apr/apr-1.5.2.tar.bz2

解压缩

 编辑[root@localhost apr-1.5.2]# vim configure

29065 行 RM='&RM -f'

 执行脚本    ./configure

编译安装

make && make insatll


编译安装apache-----apr-util

下载apr-util的包

[root@localhost software]# wget https://archive.apache.org/dist/apr/apr-util-1.5.4.tar.bz2 

解压缩

 [root@localhost software]# tar -xvf apr-util-1.5.4.tar.bz2

进行配置

 [root@localhost apr-util-1.5.4]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config

编译安装

 [root@localhost apr-util-1.5.4]# make && make install

 把编译安装的apr工具,写入系统的动态库配置文件中,然后更新这些基础动态库

echo "/usr/local/apr/lib/"  >> /etc/ld.so.conf

 编译安装httpd

安装httpd包

 wget https://downloads.apache.org/httpd/httpd-2.4.59.tar.bz2

解压缩  tar -xvf httpd-2.4.59.tar.bz2

编写配置脚本

  vim config.sh

./configure \
--enable-modules=all \
--enable-mods-shared=all \
--enable-so \
--enable-rewrite \
--with-pcre \
--enable-ssl \
--with-mpm=prefork \
--with-apr=/usr/local/apr/bin/apr-1-config \
--with-apr-util=/usr/local/apr/bin/apu-1-config

 

执行改脚本   ./config.sh 

编译安装

检查是否有httpd 

拷贝apache默认的脚本,启动命令 

[root@localhost htdocs]# cp /usr/local/apache2/bin/apachectl /etc/init.d/apache

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值