Have you ever encountered Tomcat8 environment errors in liunx environment? pit! !

Installing tomcat will not be described here.

Start tomcat

Could not find or load main class org.apache.catalina.startup.Bootstrap

wrong reason

The tomcat version is too high and cannot be supported by jdk1.6, and there is a lack of java related packages.

solution

  1. Modify tomcat parameter configuration
#/home/tomcat/apache-tomcat-8.5.92为部署路径
vim /home/tomcat/apache-tomcat-8.5.92/bin/setclasspath.sh
vim /home/tomcat/apache-tomcat-8.5.92/bin/catalina.sh

Add configurations respectively

export JAVA_HOME=/usr/local/jdk1.8.0_251
export JRE_HOME=/usr/local/jdk1.8.0_251/jre
  1. Downgrade tomcat (not advisable, probably because there are many vulnerabilities)

Restart tomcat and check the log to see if it started successfully! !

Guess you like

Origin blog.csdn.net/qq_34591972/article/details/132413509