- 安装防火墙
yum install firewalld systemd -y
- 查看已经开放的端口:
firewall-cmd --list-ports
- 开放端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
- 重启防火墙
systemctl reload firewalld
yum install firewalld systemd -y
firewall-cmd --list-ports
firewall-cmd --zone=public --add-port=80/tcp --permanent
systemctl reload firewalld