后端技术

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

2021-01-06 54 0

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

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


点赞 0

文章评论

欢迎您:

阿文博客

人生的价值,并不是用时间,而是用深度量去衡量的。——列夫·托尔斯泰

59 文章 5993 浏览 5 评论

站点信息

  • 建站时间:2021-08-03
  • 更新时间:2021-08-03
  • 网站程序:终点线
  • 主题模板《今夕何夕》
  • 文章统计59篇文章
  • 标签总数14