今天在安装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 正常运行