Blogger Information
Blog 8
fans 1
comment 0
visits 11092
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Centos7开放及查看端口
秋美
Original
1877 people have browsed it

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 --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 6379

8、中止进程

kill -9 6379

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!