程序员

Linux上安装Tomcat后,远程访问不了

2017-12-26  本文已影响0人  sparkle123

1.上传apache-tomcat-7.0.82.tar.gz到Linux上
2.解压tomcat
tar -zxvf apache-tomcat-7.0.82.tar.gz -C /usr/local/
3.启动tomcat
/usr/local/apache-tomcat-7.0.82/bin/startup.sh
4.查看tomcat进程是否启动,执行 jps

4085 Jps
3698 Bootstrap

5.查看tomcat进程端口
netstat -anpt | grep 3698

tcp        0      0 ::ffff:127.0.0.1:8005       :::*                        LISTEN      3698/java           
tcp        0      0 :::8009                     :::*                        LISTEN      3698/java           
tcp        0      0 :::8080                     :::*                        LISTEN      3698/java 

6.远程访问http://localhost:8080,并不能访问上
7.关闭iptables并设置其开机不启动

service iptables stop
chkconfig iptables on
chkconfig iptables off

8.远程访问http://localhost:8080,访问OK.

上一篇下一篇

猜你喜欢

热点阅读