weblogic啟動指令碼

來源:互聯網
上載者:User

標籤:weblogic

1、建立weblogic開機檔案
[[email protected] ~]# cd /etc/rc.d/init.d/
[[email protected] init.d]# vim 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=/resource/weblogic/export BEA_HOME=$BEA_BASE/user_projects/domains/UC_domain/binexport BEA_LOG=$BEA_HOME/weblogic.logexport PATH=$PATH:$BEA_HOMEBEA_OWNR="weblogic"# 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 1fi# 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 1esacexit 0


2、給檔案weblogic賦予可執行許可權

#chmod +x weblogic

3、添加到服務列表中

[[email protected]]# chkconfig --add weblogic

4、檢查是否添加成功

[[email protected]]# chkconfig --list | grep weblogic

weblogic      0:關閉1:關閉2:關閉3:啟用4:啟用5:啟用6:關閉

5、使用方法:

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

停weblogic服務

[[email protected] init.d]# service weblogic stop(或/etc/rc.d/init.d/weblogicstop)

Shutdown WebLogic: OK

啟weblogic服務

[[email protected] init.d]# service weblogic start(或/etc/rc.d/init.d/weblogicstart)

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



weblogic啟動指令碼

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.