CentOS取消端口限制 &打开端口 & Authorization failed. Make sure polkit agent is running or run the applica
·
由于端口限制是防火墙作用的,所以开放防火墙的限制就好
1、开启防火墙(查看防火墙状态)
systemctl start firewalld
2、开放指定端口
firewall-cmd --zone=public --add-port=1935/tcp --permanent
命令含义:
--zone #作用域
--add-port=1935/tcp #添加端口,格式为:端口/通讯协议
--permanent #永久生效,没有此参数重启后失效
3、重启防火墙
firewall-cmd --reload
4、查看端口号
netstat -ntlp //查看当前所有tcp端口·
netstat -ntulp |grep 1935 //查看所有1935端口使用情况·
5、设置端口报错
-bash-4.2$ firewall-cmd --zone=public --add-port=1935/tcp --permanent
Authorization failed.
Make sure polkit agent is running or run the application as superuser.
-bash-4.2$
切换root账户,或者使用sudo进行处理
更多推荐
所有评论(0)