linux开机启动Tomcat服务器

时间:2023-01-31 15:40:43

inux 下tomcat开机自启动
在Tomcat/bin/startup.sh 文件最底部添加:

export JAVA_HOME=/usr/java/jdk1.8.0_201
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中加入:

/usr/local/tomcat/bin/startup.sh