700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > centos启动tomcat后局域网无法访问 发现8080端口被tcp6占用解决方法

centos启动tomcat后局域网无法访问 发现8080端口被tcp6占用解决方法

时间:2022-01-09 10:15:02

相关推荐

centos启动tomcat后局域网无法访问 发现8080端口被tcp6占用解决方法

在/etc下的sysctl.conf文件末尾添加如下:

net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1net.ipv6.conf.lo.disable_ipv6 = 1

然后# reboot,在重新启动tomcat

开启8080端口

firewall-cmd --permanent --add-port=8080/tcp

firewall-cmd --reload

重定向80端口到8080端口

firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080

firewall-cmd --reload

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。