问题:

centos 5.5 上用 yum 安装了 tomcat, 启动正常,但是访问 8080 端口的网页,是空白的。

 

 

查看linux版本

[root@inside ~]# lsb_release -a

LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch

Distributor ID: CentOS

Description:    CentOS release 5.5 (Final)

Release:        5.5

Codename:       Final

 

​http://www.51testing.com/?uid-89868-action-viewspace-itemid-11978​

 

查看Tomcat安装目录

先查看使用 yum 安装了那些 名字包含tomcat的软件

[root@inside ~]# rpm -qa|grep tomcat

tomcat5-servlet-2.4-api-5.5.23-0jpp.19.el5_6

tomcat5-jasper-5.5.23-0jpp.19.el5_6

tomcat5-jsp-2.0-api-5.5.23-0jpp.19.el5_6

tomcat5-server-lib-5.5.23-0jpp.19.el5_6

tomcat5-common-lib-5.5.23-0jpp.19.el5_6

tomcat5-5.5.23-0jpp.19.el5_6

查看安装目录

[root@inside ~]# rpm -ql tomcat5

/etc/logrotate.d/tomcat5

/etc/rc.d/init.d/tomcat5

/etc/sysconfig/tomcat5

/etc/tomcat5

/etc/tomcat5/Catalina

/etc/tomcat5/Catalina/localhost

/etc/tomcat5/catalina.policy

 

从上面可以分析出 tomcat5 的 配置目录 /etc/tomcat5

 

 

查看 tomcat 5 的配置:

[root@inside bin]# tomcat5

Found JAVA_HOME: /usr/lib/java

Please complete your /etc/tomcat5/tomcat5.conf so we won’t have to look for it next time

Using CATALINA_BASE:   /usr

Using CATALINA_HOME:   /usr

Using CATALINA_TMPDIR: /usr/temp

Using JRE_HOME:

Usage: dtomcat5 ( commands … )

commands:

  debug             Start Catalina in a debugger

  debug -security   Debug Catalina with a security manager

  jpda start        Start Catalina under JPDA debugger

  run               Start Catalina in the current window

  run -security     Start in the current window with security manager

  start             Start Catalina in a separate window

  start -security   Start in a separate window with security manager

  stop              Stop Catalina

  stop -force       Stop Catalina (followed by kill -KILL)

  version           What version of tomcat are you running?

​http://tenhlf.blog.163.com/blog/static/5363158120094285224660/​

 

启动 Tomcat

[root@inside ~]# service tomcat5 restart

Stopping tomcat5:                                          [  OK  ]

Starting tomcat5:                                          [  OK  ]

从上面可以看到,启动正常

 

检查端口开放状况

netstat –nat

可以看到 8080 端口是处于监听状态的。

 

CentOS下Tomcat5.5安装(附带jdk1.6安装)

 

分析了好久没找到原因,卸掉重装。

 

​http://confluence.atlassian.com/display/JIRA041/Installing+JIRA+on+Tomcat+5.5​

 

参考资料:

CentOS5.5下安装JDK和Tomcat

CentOS yum安装Apache + PHP + MySQL + Tomcat

​http://geniux.net/glog/431​