Linux Tomcat 开机自启动的方法
修改Tomcat/bin/startup.sh 为:
export JAVA_HOME=/usr/java/j2sdk1.4.2_08
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export PATH=$PATH:$JAVA_HOME/bin
export CATALINA_HOME=/usr/local/tomcat
/usr/local/tomcat/bin/catalina.sh start
在/etc/rc.d/rc.local中加入:
/opt/apache-tomcat-7.0.42/bin/startup.sh