`
elvis4139
  • 浏览: 143936 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

CentOS 7 开放端口

阅读更多
安装完web服务器后发现无法访问端口,后来发现是防火墙原因。解决方法:

[root@centos7 bin]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
[root@centos7 bin]# firewall-cmd --reload
success
[root@centos7 bin]# firewall-cmd --zone=public --query-port=8080/tcp
yes
[root@centos7 bin]# 


PS:关闭防火墙命令:
[root@centos7 bin]# firewall-cmd --state
running
[root@centos7 bin]# systemctl stop firewalld.service
[root@centos7 bin]# firewall-cmd --state
not running
[root@centos7 bin]# 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics