首先查看系统是否占用了8080端口:
netstat -ntlp
当然你也可以过滤端口:
netstat -ntlp | grep 8080
既然程序已经监听在8080端口,这个时候你需要检查防火墙是否允许外部访问8080,当然前提知道你的Centos系统版本,因为命令有区别。
顺带着记录一系列操作:
查看系统位数:
uname -a
file /bin/ls
cat /proc/version
getconf LONG_BIT都可以!
查看系统版本:
cat /etc/os-release
cat /etc/redhat-release
rpm -q centos-release查看内核版本:
cat /proc/version
uname -a
最后,开启防火墙一个端口:
firewall-cmd --zone=public --add-port=8080/tcp --permanent (--permanent永久生效,没有此参数重启后失效)重启载入:
firewall-cmd --reload查看是否开启:
firewall-cmd --zone=public --query-port=8080/tcp移除端口:
firewall-cmd --zone=public --remove-port=8080/tcp --permanent
其他操作:
启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 : systemctl enable firewalld
参考来源:
https://www.linuxidc.com/Linux/2016-11/137550.htm
https://www.cnblogs.com/moxiaoan/p/5683743.html
分享:
崇尚极简,热爱技术,喜欢唱歌,热衷旅行,爱好电子产品的一介码农。
联系QQ:58742094
联系电话:
工作邮箱:
当你的才华还撑不起你的野心的时候,你就应该静下心来学习,永不止步!
人生之旅历途甚长,所争决不在一年半月,万不可因此着急失望,招精神之萎葸。
Copyright 2015- 芒果酷(mangocool.com) All rights reserved. 湘ICP备14019394号
免责声明:本网站部分文章转载其他媒体,意在为公众提供免费服务。如有信息侵犯了您的权益,可与本网站联系,本网站将尽快予以撤除。