今天在安裝tomcat8.5的時候報了一個錯誤
Cannot find /usr/share/tomcat/bin/setclasspath.sh
This file is needed to run this program
我ls了一下,發現目錄下是存在setclasspath.sh文件夾的,百度上一個第一個解決方案是 unset CATALINA_HOME 然后重啟可是重啟后繼續報錯
Using CATALINA_BASE: /usr/share/tomcat
Using CATALINA_HOME: /usr/share/apache-tomcat-8.5.27
Using CATALINA_TMPDIR: /usr/share/tomcat/temp
Using JRE_HOME: /usr/local/src/java/jdk1.8.0_181
Using CLASSPATH: /usr/share/apache-tomcat-8.5.27/bin/bootstrap.jar:/usr/share/apache-tomcat-8.5.27/bin/tomcat-juli.jar
touch: cannot touch ‘/usr/share/tomcat/logs/catalina.out’: No such file or directory
/usr/share/apache-tomcat-8.5.27/bin/catalina.sh: line 464: /usr/share/tomcat/logs/catalina.out: No such file or directory
我發現share文件下沒有tomcat文件夾,於是就
mv apache-tomcat-8.5.27 tomcat
然后重啟./startup.sh
tomcat 正常運行