安装防火墙
yum install firewalld systemd -y
查看已开发的端口
firewall-cmd --list-ports
开放端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
# 80 为要开放的端口号
重启防火墙
systemctl reload firewalld
查看防火墙状态
systemctl status firewalld
开启防火墙
systemctl start firewalld
关闭防火墙
systemctl stop firewalld