-bash-4.1$ cd /etc/sysconfig
-bash-4.1$ sudo cat iptables
# Generated by iptables-save v1.4.7 on Tue Aug 11 10:31:07 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [43:3848]
-A INPUT -p tcp -m tcp --dport 5901 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5900 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8089 -j ACCEPT
8089则为添加的端口访问路径。
部署Linux环境的项目的时候,执行./startup.sh已经提示tomcat已经成功启动,但是访问项目却不成功的时候,需要查看下端口设置情况。
原文链接:https://blog.csdn.net/qq_44910516/article/details/89282156