安装firewall
yum install -y firewalld
启动
systemctl start firewalld.service
设置默认启动
systemctl enable firewalld.service
开放80端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
重启防火墙
firewall-cmd --reload
查看端口是否开放
firewall-cmd --list-ports
yum install -y firewalld
systemctl start firewalld.service
systemctl enable firewalld.service
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports