問題:
Linux上tomcat是啓動的,但無法通過指定的端口號進行訪問:
解決方法:
1st way:在防火牆配置中設置端口:
命令:cd/etc/sysconfig
vi iptables
2nd way:在iptables中加入如下信息:
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
說明:加入到COMMIT上邊
3rd way: 重啓iptables服務:
service iptables stop
service iptables start
再次訪問即可