隨筆 - 6  文章 - 0  trackbacks - 0
          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          以下方法成功實(shí)施于Red Hat Enterprise Linux Server release 5.3 (Tikanga)服務(wù)器上部署的weblogic服務(wù)(版本816)

          步驟:

          1、創(chuàng)建weblogic啟動(dòng)文件

           root用戶登錄執(zhí)行命令

           [root@test init.d]# cd /etc/rc.d/init.d/

           [root@test init.d]# vi weblogic

          將以下腳本復(fù)制到weblogic文件中:

          #!/bin/bash
          # chkconfig: 345 20 80
          # description: Weblogic Server auto start/stop script.
          # /etc/rc.d/init.d/weblogic
          # Please edit the variable
          export BEA_BASE=/opt/bea
          export BEA_HOME=$BEA_BASE/user_projects/domains/rcis2
          export BEA_LOG=$BEA_HOME/weblogic.log
          export PATH=$PATH:$BEA_HOME
          BEA_OWNR="oracle"
          # if the executables do not exist -- display error
          if [ ! -f $BEA_HOME/startWebLogic.sh -o ! -d $BEA_HOME ]
          then
                echo "WebLogic startup: cannot start"
                exit 1
          fi

          # depending on parameter -- startup, shutdown, restart
          case "$1" in
            start)
                echo -n "Starting WebLogic,log file $BEA_LOG: "
                touch /var/lock/weblogic
                su - $BEA_OWNR -c "cd ${BEA_HOME}; nohup ./startWebLogic.sh > $BEA_LOG 2>&1  &"
                echo "OK"
                ;;

            stop)
                echo -n "Shutdown WebLogic: "
                rm -f /var/lock/weblogic
                su - $BEA_OWNR -c "cd ${BEA_HOME}; ./stopWebLogic.sh >> $BEA_LOG"
                echo "OK"
                ;;
            reload|restart)
                $0 stop
                $0 start
                ;;
            *)
                echo "Usage: `basename $0` start|stop|restart|reload"
                exit 1
          esac
          exit 0

          2、賦予可執(zhí)行權(quán)限,執(zhí)行命令:

          [root@test init.d]# chmod +x weblogic

          3、添加到服務(wù)列表中

          [root@test init.d]# chkconfig --add weblogic

          4、檢查是否添加成功

          [root@test init.d]# chkconfig --list | grep weblogic

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

          5、使用方法:

          開(kāi)機(jī)或重啟weblogic應(yīng)用服務(wù)器weblogic服務(wù)會(huì)自動(dòng)啟動(dòng)。

          停weblogic服務(wù)

          [root@test init.d]# service weblogic stop(或/etc/rc.d/init.d/weblogic stop)

          Shutdown WebLogic: OK

          啟weblogic服務(wù)

          [root@test init.d]# service weblogic start(或/etc/rc.d/init.d/weblogic start)

          Starting WebLogic,log file /weblogic/bea/user_projects/domains/csky/weblogic.log: OK

          posted on 2014-06-12 16:35 Glorin 閱讀(171) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 玉山县| 玛沁县| 伊春市| 子长县| 喜德县| 广昌县| 丁青县| 分宜县| 蒙阴县| 海南省| 玛多县| 玉溪市| 嵩明县| 白水县| 晴隆县| 保靖县| 襄城县| 龙山县| 霍州市| 铜川市| 佛冈县| 洛阳市| 兴隆县| 察隅县| 泰和县| 马尔康县| 九江市| 弥勒县| 隆化县| 邹平县| 正宁县| 嘉善县| 宜昌市| 兰州市| 正定县| 邯郸县| 望奎县| 余干县| 克山县| 淮南市| 乌拉特前旗|