# firewall-cmd --state
# firewall-cmd --zone=public --add-port=8080/tcp --permanent # firewall-cmd --reload
–zone=public:表示作用域为公共的;
–add-port=8080/tcp:添加tcp协议的端口8080;
–permanent:永久生效,如果没有此参数,则只能维持当前服务生命周期内,重新启动后失效;
# systemctl restart firewalld.service