centos7 编译apche服务

1.得到安装依赖 放在目录 usr/local/src中

wget https://ftp.pcre.org/pub/pcre/pcre-8.01.tar.gz
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.7.0.tar.gz
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz

2.分别解压

tar zxvf apr-1.7.0.tar.gz
tar zxvf apr-util-1.6.1.tar.gz
tar zxvf pcre-8.01.tar.gz

tar zxvpf httpd-2.4.39.tar.gz //我本地有

3.对包进行分别编译

cd pcre-8.01
./configure --prefix=/opt/pcre
make && make install

cd …/ && cd apr-1.7.0/
./configure --prefix=/opt/apr
make && make install

cd …/ && cd apr-util-1.6.1/
./configure --prefix=/opt/apr-util --with-apr=/opt/apr --with-apr-util=/opt/apr-util --with-pcre=/opt/pcre
make && make install
装的过程发现报错 于是安装
yum install expat-devel
make && make install

cd …/ && cd httpd-2.4.39/
./configure --prefix=/opt/apache --with-apr=/opt/apr --with-apr-util=/opt/apr-util --with-pcre=/opt/pcre --with-included-apr
make -j4 && make install

4.进入apache目录

cd /opt/apache/bin
./httpd
curl localhost:80

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值