Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6086810
  • 博文数量: 2759
  • 博客积分: 1021
  • 博客等级: 中士
  • 技术积分: 4091
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-11 14:14
文章分类

全部博文(2759)

文章存档

2019年(1)

2017年(84)

2016年(196)

2015年(204)

2014年(636)

2013年(1176)

2012年(463)

分类: LINUX

2013-04-09 23:27:46

原文地址:tomcat安装成系统服务: 作者:ding_cw

tomcat安装成系统服务:

cd /etc/init.d

vi tomcat

Bash代码  
  1. #!/bin/bash    
  2. # description: Tomcat Start Stop Restart    
  3. # processname: tomcat    
  4. # chkconfig: 234 20 80    
  5. JAVA_HOME=/usr/java/jdk1.6.0_30    
  6. export JAVA_HOME    
  7. PATH=$JAVA_HOME/bin:$PATH    
  8. export PATH    
  9. CATALINA_HOME=/usr/share/apache-tomcat-6.0.35    
  10.     
  11. case $1 in    
  12. start)    
  13. sh $CATALINA_HOME/bin/startup.sh    
  14. ;;     
  15. stop)       
  16. sh $CATALINA_HOME/bin/shutdown.sh    
  17. ;;     
  18. restart)    
  19. sh $CATALINA_HOME/bin/shutdown.sh    
  20. sh $CATALINA_HOME/bin/startup.sh    
  21. ;;     
  22. esac        
  23. exit 0  

chmod 755 tomcat

chkconfig --add tomcat

chkconfig --level 2345 tomcat on

chkconfig --list tomcat

阅读(972) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~