当前位置:   article > 正文

查看服务器tomcat版本_linux查看tomcat版本号

linux查看tomcat版本号
一、通过tomcat版本文件查看

  找到tomcat目录,进入”xxx/tomcat/bin” 目录,执行”sh version.sh”。如果没有设置JAVA_HOME和JRE_HOME环境变量则会报如下错误:

[jerry@host xxx/tomcat/bin]
$sh version.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
  • 1
  • 2
  • 3
  • 4

  设置JAVA_HOME和JRE_HOME环境变量:

export JAVA_HOME=xxx/java/
export JRE_HOME=xxx/java/jre/
  • 1
  • 2

  执行”sh version.sh”返回当前tomcat版本信息:

$sh version.sh
Using CATALINA_BASE:   xxx/tomcat
Using CATALINA_HOME:   xxx/tomcat
Using CATALINA_TMPDIR: xxx/tomcat/temp
Using JRE_HOME:        xxx/java/jre/
Using CLASSPATH:       xxx/tomcat/bin/bootstrap.jar:xxx/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID:    xxx/tomcat/catalina.pid
Server version: Apache Tomcat/7.0.47
Server built:   Jan 10 2014 01:31:08
Server number:  7.0.47.0
OS Name:        Linux
OS Version:     3.10.0-327.2016.os7.x86_64
Architecture:   amd64
JVM Version:    1.8.0_66-b60
JVM Vendor:     "mmm"
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
二、通过tomcat启动文件查看

  找到tomcat启动文件,本文是yyy/tomcat_stdout.log,搜索”Starting Servlet Engine”则可看到当前启动的容器版本。

...
2018-07-31 19:06:27,446 org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=xxx/tomcat
2018-07-31 19:06:27,447 org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/zzz/.default/temp
2018-07-31 19:06:27,571 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-7001"]
2018-07-31 19:06:27,586 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 842 ms
2018-07-31 19:06:27,628 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
2018-07-31 19:06:27,629 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.59.463
...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/156822?site
推荐阅读
相关标签
  

闽ICP备14008679号