Linux related issues - Tomcat can not be self-started under CentOS6.5x64 version

  

Some time ago using Alibaba Cloud server, using Linux CentOS6.5 system, after building Tomcat, Tomcat can not start,

The command to start tomcat is tomcat_home/bin/startup.sh or tomcat_home/bin/catalina.sh start. When you directly add any of them to /etc/rc.local, you find that the problem still cannot be solved, so write The following self-start script

export JAVA_HOME=/usr/local/jdk1.7.0_51export PATH=$JAVA_HOME/bin/:$PATHexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/Tools.jar:$CLASSPATHexport CATALINA_HOME=/usr/local/apache-tomcat-7.0.53/usr/local/apache-tomcat-7.0.53/bin/catalina.sh start saved as a name called auto-startup.sh The file is stored in /usr/local/apache-tomcat-7.0.53/bin

and then /usr/local/apache-tomcat-7.0.53/bin/auto-startup.sh is added in /etc/rc.local Just fine.

Note: 1.auto-startup.sh needs to have execute permission. Execute the command chmod a+x auto-startup.sh

in the bin directory. 2./usr/local/apache- Tomcat-7.0.53 is the Tomcat path, and /usr/local/jdk1.7.0_51 is the jdk path. Both are indispensable

Copyright © Windows knowledge All Rights Reserved