1. #vi etc/rc.d/rc.local
2、添加以下内容
export JAVA_HOME=/usr/java/jdk1.7.0_76
/usr/local/tomcat/apache-tomcat-7.0.54/bin/startup.sh start
3、此时添加保存不成功
需要 chmod +x rc.local 设置权限
4、保存即可
export JAVA_HOME=/usr/java/jdk1.7.0_76
/usr/local/tomcat/apache-tomcat-7.0.54/bin/startup.sh start