firewall-cmd –add-port=5666/tcp 即时打开,这里也可以是一个端口范围,如1000-2000/tcp firewall-cmd –permanent –add-port=3306/tcp 持久开放端口 systemctl reload firewalld.service 重启防火墙 firewall-cmd –list-ports 查看开放的端口