zhyiwww
用平实的笔,记录编程路上的点点滴滴………
posts - 536,comments - 394,trackbacks - 0
步骤和配置oracle的自启动相似,不过是脚本不同。
步骤如下
[1]touch /etc/init.d/tomcat6
[2]vim /etc/init.d/tomcat6
内容如下:

#!/bin/sh  
#tomcat auto-start  
#  
# description: Auto-starts tomcat  
# processname: tomcat  
# pidfile: /var/run/tomcatpid  

export JAVA_HOME=/opt/jdk1.6.0_18
export CATALINA_HOME=/opt/apache-tomcat-6.0.18

case $1 in  
start)  
sh $CATALINA_HOME/bin/startup.sh  
;;  
stop)  
sh $CATALINA_HOME/bin/shutdown.sh  
;;  
restart)  
sh $CATALINA_HOME/bin/shutdown.sh  
sh $CATALINA_HOME/bin/startup.sh  
;;  
*)  
echo 'Usage:tomcat start|stop|restart'  
;;  
esac  

exit 0



[3]chkconfig --add tomcat6

[4]chkconfig --edit tomcat6
内容为
tomcat6 on
[5]chkconfig --list tomcat6

tomcat6                   0:off  1:off  2:on   3:on   4:on   5:on   6:off

至此设置完毕。






|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|
posted on 2010-01-29 13:13 zhyiwww 阅读(1091) 评论(0)  编辑  收藏 所属分类: linux

只有注册用户登录后才能发表评论。


网站导航: