linux操作常用命令

此篇文章是根据自己经常使用的命令进行记录备忘,不断更新

防火墙(centos7)

永久开放某个端口号:

firewall-cmd --zone=public --add-port=8080/tcp --permanent

永久关闭某个端口号:

firewall-cmd --zone= public --remove-port=8080/tcp --permanent

打开防火墙:

systemctl start firewalld

关闭防火墙:

systemctl stop firewalld

查看防火墙状态:

systemctl status firewalld

原文地址:https://www.cnblogs.com/ITDreamer/p/10990161.html