CentOS下实现程序开机自启动(Tomcat为例) : vim /etc/rc.d/rc.local 打开后用下文覆盖即可 -----------------------------------------------------------------
# This script will be executed *after* all the other init scripts.
export JAVA_HOME=/home/hostname/jdk1.6.0_31 #tomcat自启动 /home/hostname/apache-tomcat-6.0.35/bin/startup.sh #其他程序自启动例子 /usr/bin/程序名
touch /var/lock/subsys/local |