Weblogic STARTUP script v2.0 and weblogic script v2.0

Source: Internet
Author: User

Weblogic STARTUP script v2.0 and weblogic script v2.0
Change location

1. The application in the test is UF NC6. Because the NC cluster has the concept of master, non-master nodes depend on the master node, in this case, the master must be determined to start normally first, to start other nodes.

After the project test, it is found that sometimes other nodes are started after the master port is opened, and sometimes the master not ready error occurs. Therefore, add sleep 20 after the master port is started manually.

2. Because all other servers have no dependency, they can be started in parallel to reduce the startup time.

3. Use the function to process the startup process and determine the port opening process, which effectively reduces the number of codes.

#! /Bin/bash # author: wjf # date: 2015/05/19 # version: 2.0 # test environment: wls1036 horizontal cluster v_curr_user = 'whoam' # ------------ actual was and code installation user, for example, if you use ufida, simply change "nc63" to "ufida. V_start_user = uweblogic # ------------ user v_admin_url = http: // 10.10.71.106: used to install and start the weblogic Server: 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 (beginning) ------------------ f_start_ms master 8001 sleep 20f_start_ms server1 8002 & f_start_ms server2 80003 & # --------------- modify the custom part (final) ------------------- 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



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.