我正在尝试查找从 tar 文件安装的 tomcat 版本,而不是通过嗯,那么我们如何找出这一点。
答案1
安装java后,进入tomcat/bin
目录并运行以下命令:
./version.sh
输出将采用以下格式:
Using CATALINA_BASE: /opt/tomcat/apache-tomcat-9.0.33
Using CATALINA_HOME: /opt/tomcat/apache-tomcat-9.0.33
Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-9.0.33/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/tomcat/apache-tomcat-9.0.33/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-9.0.33/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Server version: Apache Tomcat/9.0.33
Server built: Mar 11 2020 09:31:38 UTC
Server number: 9.0.33.0
OS Name: Linux
OS Version: 4.18.0-147.5.1.el8_1.x86_64
Architecture: amd64
JVM Version: 11.0.6+10-LTS
JVM Vendor: Oracle Corporation