centos 安装nginx遇到的问题


1、

checking for OS
+ Linux 3.10.0-327.el7.x86_64 x86_64
checking for C compiler ... not found

./configure: error: C compiler cc is not found

解决方法:安装gcc

yum -y install gcc

2、the HTTP rewrite module requires the PCRE library

解决方法:安装pcre-devel解决问题
yum -y install pcre-devel

3、the HTTP gzip module requires the zlib library.

解决方法:安装zlib-devel

yum -y install zlib-devel

4、bash: make: 未找到命令

解决方法:yum -y install gcc automake autoconf libtool make

5、查看进程

ps -ef |grep nginx

6、查看端口

netstat -ntlp|grep 80

7、开放80端口对外访问

firewall-cmd --zone=public --add-port=80/tcp --permanent(执行完之后要重启防火墙才能看到加入的规则)

8、重启防火墙:firewall-cmd --reload  

 

9、查看已经开放的端口:firewall-cmd --list-ports  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM