安装firewalld 防火墙yum install firewalld
开启服务systemctl start firewalld.service
启动防火墙 systemctl start firewalld
关闭防火墙systemctl stop firewalld.service
开机自动启动systemctl enable firewalld.service
查看状态firewall-cmd --state
//running 表示运行
重新加载防火墙:firewall-cmd --reload
开放防火墙8080端口,指令是firewall-cmd --permanent --add-port=8080/tcp
开启多少个端口: firewall-cmd --list-ports