.打开8000端口
[root@svnhost ~]# firewall-cmd --add-port=8000/tcp
success
写入文件
[root@svnhost ~]# firewall-cmd --permanent --add-port=8000/tcp
success
重启防火墙
[root@svnhost ~]# firewall-cmd --reload
success
查看端口是否打开,yes说明打开
[root@svnhost ~]# firewall-cmd --query-port=8000/tcp
yes
关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
启动:# systemctl start firewalld
查看状态:# systemctl status firewalld 或者 firewall-cmd –state
停止:# systemctl disable firewalld
禁用:# systemctl stop firewalld
重启:#systemctl restart firewalld