Centos開機自啓動

轉自:http://blog.csdn.net/fjssharpsword/article/details/7436898

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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章