Weblogic start/stop script

Source: Internet
Author: User
Tags stop script

Weblogic start/stop script
Start weblogic

Determine whether to enable the service by using the port.

 

#! /Bin/bash # author: wjf # date: # test environment: wls1036 horizontal cluster v_curr_user = 'whoam' v _ start_user = uweblogic # ------------ user v_admin_url = http: // 10.10.71.106: 9001 # ------------ manage the server's urlv_dir_domain_bin =/weblogic/Oracle/Middleware/user_projects/domains/gyhr_domain/bin # ------------ start the bin directory path of the domain v_admin_port = 9001 # ------------ weblogic manage # determine whether to enable f_is_service_start () when the service is enabled Based on the Service port () {v_is_port_open = 0 while [$ {v_is_port_open}-eq 0] dosleep 10v_is_port_open = 'netstat-ano | grep $ {1} | wc-l 'done} # Start the managed server 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} After startup" echo ""} # Main Code part if [$ {v_curr_user} = $ {v_start_user}] then # echo in the startup Service Code section "Start Management Server" cd $ {v_dir_domain_bin} nohup. /startWebLogic. sh & f_is_service_start $ {v_admin_port} echo "Start the Management server" echo "" # ----------------- modify the custom part (start) ------------------ f_start_ms server 8088 # --------------- modify the custom part (end) ------------------- elseecho "the current user is $ {v_curr_user}" echo "we recommend that you use $ {v_start_user} to start the service" echo "check the current user environment" fi

 

Stop script

 

Force shutdown with killall java. If other java programs are running in the system, this script is not applicable.

 

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 disabled successfully"

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.