Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix startup scripts for WebLogic server 8.1 1

Status
Not open for further replies.

trunix

Technical User
Aug 1, 2001
191
0
0
GB
I have installed WLS8.1 on Solaris unix servers and can start WLS from the command line with :-
nohup ./startWebLogic.sh &
But I can't figure out to set up a unix startup script under /etc/rc3.d so that WLS will startup on a reboot.
Has anyone managed to do this ?
 
In my environment we use Linux. I had the same question when we were setting up our servers.I am a lot better with AIX but have experience with Solaris and HPUX. I am not sure if Solaris has a rc.local file but it can startup the admin and managed servers at boot.If there is no rc.local file your will have to create a startup script in one of your etc/init/rc3.d files. rc.local is the last script to run after bootup so we just did something like
#Starting the dmsDomain admin server
su - bea -c "cd /home/bea/bea/user_projects/domains/dmsDomain;./waStartdms.sh"
Are you also responsible for support of Weblogic?
The waStartdms.sh script has a nohup starting the admin server.
Good luck
 
This is what we use for a wls 7 server, check this against your file structure then once modified, plant this in a /etc/init.d/wls-server RC file and create a link to it in /etc/rc2.d/ as something like S99Weblogic-Server (or rc3.d if you realy want to start it there).

Code:
#!/bin/sh
#
# Start scipt for BEA Weblogic 7.0

case "$1" in
'start')

   HOSTNAME=`/usr/bin/hostname`
   if [ -f /opt/weblogic/206*128_$HOSTNAME.txt ]; then
     cp /opt/weblogic/206*128_$HOSTNAME.txt /opt/weblogic/license.bea
   fi

   if [ ! -f /var/log/weblogic/weblogic_admin.log ]; then
      mkdir -p /var/log/weblogic
      chown wls:wls /var/log/weblogic
      touch /var/log/weblogic/weblogic_admin.log
      touch /var/log/weblogic/weblogic_ms1.log
      chown nobody:wls /var/log/weblogic/weblogic_admin.log
      chown nobody:wls /var/log/weblogic/weblogic_ms1.log
   fi

   if [ -f /opt/weblogic/user_projects/Main/startWebLogic.sh ]; then
      cd /opt/weblogic/user_projects/Main
      nohup sh ./startWebLogic.sh > /var/log/weblogic/weblogic_admin.log 2>&1 &
   fi

   if [ -f /opt/weblogic/user_projects/Main/startManagedServer1.sh ]; then
      cd /opt/weblogic/user_projects/Main
      nohup sh ./startManagedServer1.sh > /var/log/weblogic/weblogic_ms1.log 2>&1 &
   fi

   ;;

'stop')

   echo "Setting Environment"
   cd /opt/weblogic/user_projects/Main
   . ./setEnv.sh

   echo "Stopping ManagedServer1"
   java weblogic.Admin -url 127.0.0.1:7001 -username adminuser -password somepassword FORCESHUTDOWN ManagedServer1
   echo "Stopping AdminServer"
   java weblogic.Admin -url 127.0.0.1:7001 -username adminuser -password somepassword FORCESHUTDOWN AdminServer

   ;;

esac

exit 0

Be careful about the wordwrap here and you will also need to resolve your own adminuser/password and logfile paths.

Good luck
Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top