Apache Web服务器安装 出现make: *** No targets specified and no makefile found. Stop.及出现configure: error解决方法

yum install gcc-c++.x86_64
yum install gcc.x86_64
yum install apr-devel apr-util-devel pcre-devel -y
cd /usr/src ;
1.进入Apache官网下载 httpd-2.4.41.tar.bz压缩包到本地目录(需yum install lrzsz -y 上传下载软件)
http://httpd.apache.org/download.cgi

2.进入CentOS或CRT下载压缩包
rz 下载本地 httpd-2.4.41.tar.bz

3.解压 httpd-2.4.41.tar.bz
tar -xjvf httpd-2.4.41.tar.bz

4.进入解压目录
cd httpd-2.4.41/

5.预编译Apache,启用rewrite规则.动态加载库
./configure --prefix=/usr/local/apache/ --enable-rewrite --enable-so

6.编译
make

7.安装
make install

8.启动Apache服务,临时关闭SELinux.firewalld
/usr/local/apache2/bin/apachectl start
setenforce 0
systemctl stop firewall.service

9.用客户端浏览器访问http://虚拟机ip地址/检验是否成功

出现的错误:
make: *** No targets specified and no makefile found. Stop.
解决方法:
yum install gcc-c++.x86_64
yum install gcc.x86_64

出现的错误:
checking for APR… configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.
解决方法:
yum install apr-devel apr-util-devel

出现的错误:
checking for pcre-config… false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
解决方法:
yum install pcre-devel -y

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值