欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          linux下開機啟動DB2,WAS,TDS服務(wù)

          linux下開機啟動DB2,WAS,TDS服務(wù)

           

          參考鏈接:

          http://www.2cto.com/database/201207/141858.html

          www.2cto.com

          http://www.2cto.com/os/201207/141862.html

          1.轉(zhuǎn)到/etc/init.d 目錄下。

          以root身份執(zhí)行

          Shell代碼

          cd /etc/init.d

           

          2.編寫DB2啟動腳本

          Shell代碼

          vi startDB2

          輸入以下內(nèi)容

          Shell代碼

          #!/bin/sh

          # chkconfig: 2345 99 01

          # processname:IBMDB2

          # description:db2 start

           

          DB2_HOME=”/home/db2inst1/sqllib” #安裝db2用戶的sqllib

          DB2_OWNER=”db2inst1″ ? ? ? ? ? ? #db2用戶名

          www.2cto.com

          case “$1” in

          start )

          echo -n “starting IBM db2”

          su – $DB2_OWNER -c $DB2_HOME/adm/db2start

           

          touch /var/lock/db2

          echo “ok”

          ;;

          stop )

          echo -n “shutdown IBM db2”

          su – $DB2_OWNER -c $DB2_HOME/adm/db2stop

          rm -f /var/lock/db2

          echo “ok”

          ;;

          restart|reload)

          $0 stop

          $0 start

          ;;

          *)

          echo “usage:$0 start|stop|restart|reload”

          exit 1 ? ?www.2cto.com

           

          esac

          exit 0

           

          3.編寫啟動was和tds的腳本。

          Shell代碼

          vi startWasTds

          輸入以下內(nèi)容

          Shell代碼

          #!/bin/sh

          # chkconfig: 2345 99 01

          # processname:IBMTDSWAS

          # description:filenet was tds

           

          /opt/IBM/WebSphere/AppServer/profiles/AppSrvTds/bin/startServer.sh server1

          /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh server1

          /opt/IBM/WebSphere/AppServer/profiles/ilog/bin/startServer.sh serve1

           

          #TDS

          /opt/ibm/ldap/V6.3/sbin/ibmdiradm -l dsrdbm01 -t

          /opt/ibm/ldap/V6.3/sbin/ibmslapd

           

          參數(shù)說明:

          頭部注釋:

          linux 命令 chkconfig 要求文件頭中必須包含:下面這3項

          Shell chkconfig代碼 ? ?www.2cto.com

          # chkconfig: 2345(默認(rèn)的runlevel) 99(啟動優(yōu)先級) 01(關(guān)閉優(yōu)先級)

          # processname:進程名稱

          # description:進程描述

           

          4.給文件賦予權(quán)限

          Shell代碼

          chmod -R 777 startDB2

          chmod -R 777 startWasTds

          chkconfig –add startDB2

          chkconfig –add startWasTds

          添加開機啟動成功。

           

           

          作者 xkorey

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號