WebLogic Start-Stop script

Source: Internet
Author: User
Tags stop script

WebLogic Start

Use whether the port is open to determine whether the service is started.

#!/bin/bash#author:wjf#date:2015/05/19# test environment for wls1036 horizontal cluster v_curr_user= ' WhoAmI ' v_start_user=uweblogic#------------ User v_admin_url=http://10.10.71.106:9001#------------Management Server for installing and starting the WebLogic server urlv_dir_domain_bin=/weblogic/ oracle/middleware/user_projects/domains/gyhr_domain/bin#------------The Bin directory path of the startup domain v_admin_port=9001#------------ WebLogic Management Server Port # has started F_is_service_start () {v_is_port_open=0while [${v_is_port_open}-eq 0]dosleep Depending on whether the service port has opened the decision service 10v_is_port_open= ' Netstat-ano |grep ${1}|wc-l ' done} #启动受管理服务器f_start_ms () {echo ' Start managed server ${1} ' CD ${v_dir_domain_bin} Nohup./startmanagedweblogic.sh ${1} ${v_admin_url} &f_is_service_start ${2}echo "${1} launch Complete" echo ""} #主代码部分 if [${v_c Urr_user} = ${v_start_user}] Then #启动服务代码部分echo "Start the Management Server" CD ${v_dir_domain_bin}nohup./startweblogi c.sh &f_is_service_start ${v_admin_port}echo "Start the Management Server Complete" echo "#---------------Modify the Custom section (start)------------------f_ Start_ms Server 8088 #---------------Modify Custom section (end)-------------------Elseecho "Current user is ${v_curr_User} "echo" recommends using ${v_start_user} to start the service "echo" Please check the current user environment "fi 

Stop script

This script does not apply if other Java programs are running in the system with Killall Java as a mandatory shutdown.

cd/home/weblogic/bea/user_projects/domains/nc6domain/nc6domain/bin./stopmanagedweblogic.sh Proxy&sleep 20./ stopmanagedweblogic.sh server1&sleep 20./stopweblogic.sh&sleep 15v_java_process_num= ' ps-ef |grep java|wc-l ' While [! ${v_java_process_num}-eq 1  ]   do      killall  java      sleep 1      v_java_process_num= ' Ps-ef | grep java|wc-l '   doneecho "WebLogic successfully closed"





WebLogic Start-Stop script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.