添加一下語句並保存
#add for chkconfig
#chkconfig: 2345 70 30
#description: sorfware autoload
#processname: tomcat_autostart
cd /usr/local/tomcat/bin/
sh startup.sh
二、
添加可執行權限
chmod +x /etc/init.d/tomcat_autostart
chkconfig --add /etc/init.d/tomcat_autostart
三、
vim /usr/local/tomcat/bin/startup.sh
export JAVA_HOME=/usr/java/jdk_version_xxx