systemctl start firewalld
firewall-cmd --zone=public --add-port=1935/tcp --permanent 命令含义: --zone #作用域 --add-port=1935/tcp #添加端口,格式为:端口/通讯协议 --permanent #永久生效,没有此参数重启后失效
firewall-cmd --reload
netstat -ntlp //查看当前所有tcp端口· netstat -ntulp |grep 1935 //查看所有1935端口使用情况·
本文转载自:https://zhuanlan.zhihu.com/p/349036028#:~:text=Linux%E5%BC%80%E6%94%BE%E6%8C%87%E5%AE%9A%E7%AB%AF%E5%8F%A3%E5%91%BD%E4%BB%A4%20%28CentOS%29%201%201%E3%80%81%E5%BC%80%E5%90%AF%E9%98%B2%E7%81%AB%E5%A2%99%20systemctl%20start%20firewalld%202,1935%20%2F%2F%E6%9F%A5%E7%9C%8B%E6%89%80%E6%9C%891935%E7%AB%AF%E5%8F%A3%E4%BD%BF%E7%94%A8%E6%83%85%E5%86%B5%C2%B7%20%E5%8F%91%E5%B8%83%E4%BA%8E%202021-02-02%2023%3A45%20%E9%98%B2%E7%81%AB%E5%A2%99%20systemctl%20cmd