1. 程式人生 > >centos6開機啟動tomcat

centos6開機啟動tomcat

centos6原始碼安裝tomcat後,需要開機啟動tomcat,首先編輯catalina.sh,在最開始新增:

#chkconfig:2345 97 00
#description:tomcat auto start
#processname:tomcat
export CATALINA_BASE=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
export CATALINA_TMPDIR=/usr/local/tomcat/temp
export JAVA_HOME=/usr/java/jdk1.7.0_79

這些欄位的意義自己百度,ln -s /usr/local/tomcat/bin/catalina.sh /etc/init.d/tomcat 建立catalina.sh軟連線到/etc/init.d,

chkconfig tomcat on,使用service tomcat start試試看,tomcat是否啟動了?如果這個啟動了的話,開機啟動tomcat就沒啥問題了.