我正在嘗試查找從 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