首页 > 其他 > 详细

CentOS7桌面版安装nginx常见问题

时间:2020-08-08 09:41:32      阅读:84      评论:0      收藏:0      [点我收藏+]

编译安装nginx报错 checking for C compiler ... not found

编译安装在执行./configure步骤报错,是因为缺少环境变量

checking for C compiler … not found
./configure: error: C compiler cc is not found

解决办法

 yum -y install gcc
 yum -y install gcc-c++

./configure: error

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre= option.

解决办法

yum -y install openssl openssl-devel

安装运行之后本地浏览器输入ip无法访问

解决办法:永久关闭防火墙

查看防火墙状态:

systemctl status firewalld.service
技术分享图片
如上图:防火墙运行状态

执行关闭命令:

systemctl stop firewalld.service

再次执行查看防火墙命令:

systemctl status firewalld.service
如下图所示表示防火墙已经关闭
技术分享图片

执行开机禁用防火墙自启命令 :

systemctl disable firewalld.service
完成

关于防火墙的其他命令:

启动:

systemctl start firewalld.service

防火墙随系统开启启动 :

systemctl enable firewalld.service

CentOS7桌面版安装nginx常见问题

原文:https://www.cnblogs.com/wxguo/p/13456415.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!