CentOS起動時にTomcat自動起動のプログラムを設定する方法

vim /etc/rc.d/rc.local

# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.
export JAVA_HOME=/home/hostname/jdk1.6.0_31
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export CATALINA_HOME=/home/hostname/apache-tomcat-6.0.35
#tomcatが自動起動
/home/hostname/apache-tomcat-6.0.35/bin/startup.sh
#他のプログラムの起動サンプル
/usr/bin/
touch /var/lock/subsys/local

Source

Posted by arkgame