apache2.4.39 php,apache2.4.39编译安装

1. 安装依赖包

yum安装依赖yum -y install make gcc-c++ cmake bison-devel ncurses-devel libtool bison perl perl-devel perl perl-devel zlib zlib-devel

2. 编译安装编译安装apr:

yum install -y bzip2

tar xf apr-1.6.3.tar.bz2

cd apr-1.6.3

./configure --prefix=/usr/local/apr

make && make install

编译安装apr-util:

yum install -y expat expat-devel

tar xf apr-util-1.6.1.tar.gz

cd apr-util-1.6.1

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make && make install

编译安装pcre:

tar xf pcre-8.41.tar.gz

cd pcre-8.41

./configure --prefix=/usr/local/pcre

make && make install

编译安装apache:

tar xf httpd-2.4.39.tar.gz

cd httpd-2.4.39

./configure --prefix=/usr/local/apache2 \

--with-pcre=/usr/local/pcre \

--with-apr=/usr/local/apr \

--with-apr-util=/usr/local/apr-util \

--enable-so \

--enable-modules=most \

--enable-mods-shared=all \

--enable-rewrite=shared

make && make install

3.管理apache2#创建软连接方便使用

ln -s /usr/local/apache2/bin/apachectl /sbin/

#启动apache

apachectl start

#停止

apachectl stop

#重启

apachectl restart

#优雅重启

apachectl graceful

#优雅停止

apachectl graceful-stop

最后更新于 2020-06-01 01:33:52 并被添加「apache」标签,已有 96 位童鞋阅读过。

本站使用「署名 4.0 国际」创作共享协议,可自由转载、引用,但需署名作者且注明文章出处

相关文章

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值