日期:2014-05-16 浏览次数:20830 次
tomcat一直在linux中无法随机启动服务,经过反复的修改终于在晚上调通。
vi /etc/rc.local
#!/bin/sh # # 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. touch /var/lock/subsys/local #tomcat export JDK_HOME=/usr/java/jdk1.6.0_22 export JAVA_HOME=/usr/java/jdk1.6.0_22 /usr/local/tomcat/bin/startup.sh #ssh /etc/init.d/sshd start #vsftpd /etc/init.d/vsftpd start
除了tomcat,其他的只要把启动参数写入rc.local就好。