Warning: include_once(/www/wwwroot/huison.cn/head.php): failed to open stream: Permission denied in /www/wwwroot/huison.cn/show.php on line 48

Warning: include_once(): Failed opening 'head.php' for inclusion (include_path='.:/www/server/php/56/lib/php') in /www/wwwroot/huison.cn/show.php on line 48

Warning: include_once(/www/wwwroot/huison.cn/banner.php): failed to open stream: Permission denied in /www/wwwroot/huison.cn/show.php on line 53

Warning: include_once(): Failed opening 'banner.php' for inclusion (include_path='.:/www/server/php/56/lib/php') in /www/wwwroot/huison.cn/show.php on line 53

Centos7开放及查看端口


1、开放/关闭端口

firewall-cmd --zone=public --add-port=5672/tcp --permanent   # 开放5672端口

firewall-cmd --zone=public --remove-port=5672/tcp --permanent  #关闭5672端口

firewall-cmd --reload   # 配置立即生效



2、查看防火墙所有开放的端口


firewall-cmd --zone=public --list-ports



3.、关闭防火墙

如果要开放的端口太多,嫌麻烦,可以关闭防火墙,安全性自行评估


systemctl stop firewalld.service



4、查看防火墙状态


 firewall-cmd --state



5、查看监听的端口


netstat -lnpt


PS:centos7默认没有 netstat 命令,需要安装 net-tools 工具,yum install -y net-tools

 

6、检查端口被哪个进程占用


netstat -lnpt |grep 5672


 

7、查看进程的详细信息


ps 6832


 

8、中止进程


kill -9 6832


其它相关文章:

Warning: include_once(/www/wwwroot/huison.cn/foot.php): failed to open stream: Permission denied in /www/wwwroot/huison.cn/show.php on line 126

Warning: include_once(): Failed opening 'foot.php' for inclusion (include_path='.:/www/server/php/56/lib/php') in /www/wwwroot/huison.cn/show.php on line 126