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.aygfsteel.com/zhyiwww   
          |----------------------------------------------------------------------------------------|
          posted on 2010-01-29 13:13 zhyiwww 閱讀(1105) 評論(0)  編輯  收藏 所屬分類: linux
          主站蜘蛛池模板: 温泉县| 五原县| 华亭县| 饶河县| 灌南县| 贡嘎县| 来宾市| 体育| 高邮市| 县级市| 健康| 兴仁县| 河东区| 临漳县| 广平县| 天气| 甘谷县| 遵义县| 景泰县| 华蓥市| 贵溪市| 新化县| 微山县| 和顺县| 剑川县| 遂川县| 孝义市| 永福县| 财经| 石泉县| 上高县| 绥德县| 横峰县| 玛曲县| 黑山县| 上虞市| 那坡县| 格尔木市| 巨野县| 嘉鱼县| 香格里拉县|