隨筆 - 6  文章 - 0  trackbacks - 0
          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

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

          步驟:

          1、創建weblogic啟動文件

           root用戶登錄執行命令

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

           [root@test init.d]# vi weblogic

          將以下腳本復制到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、賦予可執行權限,執行命令:

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

          3、添加到服務列表中

          [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、使用方法:

          開機或重啟weblogic應用服務器weblogic服務會自動啟動。

          停weblogic服務

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

          Shutdown WebLogic: OK

          啟weblogic服務

          [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 閱讀(172) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 扎囊县| 连南| 平山县| 于都县| 台安县| 湟中县| 金堂县| 屏东县| 孟州市| 隆子县| 安国市| 辽源市| 商水县| 武胜县| 长武县| 合阳县| 巫溪县| 山东省| 尤溪县| 武义县| 平阳县| 五台县| 苗栗县| 边坝县| 上栗县| 离岛区| 沅陵县| 二连浩特市| 鄄城县| 石楼县| 石阡县| 延边| 罗田县| 田阳县| 霍州市| 鸡西市| 衡山县| 安陆市| 汝州市| 弋阳县| 海门市|