下载源码脚本

[root@application2019030517 soft]# cat http.sh
#!/bin/bash
if [ ! -f httpd-2.4.10.tar.gz ];then
  wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/httpd/httpd-2.4.10.tar.gz
fi

if [ ! -f apr-1.5.0.tar.gz ];then
  wget http://oss.aliyuncs.com/aliyunecs/onekey/apache/apr-1.5.0.tar.gz
fi

if [ ! -f apr-util-1.5.3.tar.gz ];then
  wget http://oss.aliyuncs.com/aliyunecs/onekey/apache/apr-util-1.5.3.tar.gz
fi

解压

[root@application2019030517 soft]# tar zxvf httpd-2.4.10.tar.gz 
[root@application2019030517 soft]# tar zxvf apr-1.5.0.tar.gz 
[root@application2019030517 soft]# tar zxvf apr-util-1.5.3.tar.gz 

安装apr

[root@application2019030517 soft]# cd apr-1.5.0
[root@application2019030517 apr-1.5.0]# ./configure --prefix=/ecapp/apr
报错
rm: cannot remove 'libtoolT': No such file or directory
解决
vi configure
默认RM='$RM'
更改成为
RM='$RM  -f'
编译
make
安装
make install

安装apr-util

[root@application2019030517 apr-util-1.5.3]# ./configure --prefix=/ecapp/apr-util --with-apr=/ecapp/apr/bin/apr-1-config
编译安装
[root@application2019030517 apr-util-1.5.3]# make && make install

安装http

预编译
[root@application2019030517 httpd-2.4.10]# ./configure  \
>  --prefix=/ecapp/apache \
> --sysconfdir=/etc/httpd \
> --with-apr=/ecapp/apr/bin/apr-1-config \
>  --with-apr-util=/ecapp/apr-util/bin/apu-1-config \
> --with-included-apr
报错
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
解决方法
[root@application2019030517 httpd-2.4.10]# cp -r /ecapp/soft/apr-1.5.0 ./srclib/apr
[root@application2019030517 httpd-2.4.10]# cp -r /ecapp/soft/apr-util-1.5.3 ./srclib/apr-util
编译安装
make && make install

  

 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

 

 

 

 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄