Scripts for starting Managed Server in weblogic

Below are the sample startup scripts for starting weblogic admin and managed server. The Filename can be anything that you like for all. Make sure that the file name used for the general startup script “startWLServer.sh” is also updated in the UCM and IBR startup script

========================================
Nodemanager Startup script –
Filename: StartNodemanager.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Starting Node Manager
cd [MiddlewareHome]/wlserver_10.3/server/bin/
nohup startNodeManager.sh 10.11.71.130 < /dev/null > /dev/null 2>&1 &

========================================
Admin Server Startup Script
Filename: StartAdminServer.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cd [MiddlewareHome]/user_projects/domains/mydomain/bin
echo Starting Admin Server
nohup startWebLogic.sh < /dev/null > /dev/null 2>&1 &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

========================================
General script for starting all managed servers. This is used in other scripts like startUCM.sh below
Filename: startWLServer.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh
echo Checking to see if $1 is already started:
SLEEPTIME=$2; if [ “$SLEEPTIME” = “” ]; then SLEEPTIME=0; fi
DPID=$(ps -ef|grep $1|grep -v grep | grep -v startWLServer.sh)
#echo output = $DPID
if [ “$DPID” != “” ]; then
echo ‘   ‘ $1 Already Started
exit 0
else
echo    Starting $1 in $SLEEPTIME seconds;
cd [MiddlewareHome]/user_projects/domains/mydomain/bin
sleep $SLEEPTIME
nohup startManagedWebLogic.sh $1 http://10.1.1.2:7001 < /dev/null > /dev/null 2>&1 &
exit 0
fi
exit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

========================================
UCM and IBR Startup script
Filename: startUCM.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#echo Starting UCM Server
nohup startWLServer.sh UCM_server1 < /dev/null > /dev/null 2>&1 &

# wait for 15 seconds before next script is executed
SLEEPTIME=15
#echo Starting IBR Server
nohup startWLServer.sh IBR_server1 < /dev/null > /dev/null 2>&1 &

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note:

  1. Before you run the startup scripts, you need to create follow the following steps so that the respective servers boot without usernamd and password:
    • Go to  weblogic home directory /user_projects/domains/domain_name/servers
    • Go to the the mentioned server directory that you wish to start without user id and password
      eg: cd IBR_server
    • create a directory named security and assign permission 750
    • cd security
    • create boot.properties under it with a permission of  644
    • vim boot.properties and type username :weblogic and password= the password that is set and save the file

    Now you should be able to start the managed server without the user id and password

  2. If the startup scripts are giving errors try changing the command as below
    Instead of nohup startWLServer.sh IBR_server1 < /dev/null > /dev/null 2>&1 &
    Try nohup ./startWLServer.sh IBR_server1 < /dev/null > /dev/null 2>&1 &