Oracle Weblogic Start Scripts for Linux

Create Startup scripts for Weblogic Admin server and NodeManager

 

The following instructions are for creating Linux Startup scripts for Weblogic 10.x This procedure uses RC scripts for starting / shutting down the process as a UNIX daemon.

 

  • Login to a root account
  • Create the following file in the /etc/init.d/weblogic_start with the following contents. Modify to match your specific environment
su – oracle -c “nohup /u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/startWebLogic.sh &”
su – oracle -c “nohup /u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/startNodeManager.sh &”

 

 

  • This will start the weblogic admin process as a specified user “oracle” and run it in the background.
  • This will also start the NodeManager if configured.
su – oracle -c “/u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/stopWebLogic.sh”
kill -9 ps -ef | grep weblogic.Node | grep jdk | awk '{print $2 }'

 

 

  • The image above shows the /etc/init.d/weblogic_stop script which will stop the Weblogic Admin server as well as stop the NodeManager.

 

  • Next step is to create the symbolic links in the /etc/rc3.d directory so things will stop and start correctly.
  • From the /etc/rc3.d directly you will need to run the following command to link the new weblogic_start and weblogic_stop scripts. Make sure you use the “S80” and “K20” in the names of the startup links.cd /etc/rc3.d
    ln -s ../init.d/weblogic_start S80weblogic_start
    ln -s ../init.d/weblogic_stop K20weblogic_stop

    Things should look like this:

    lrwxrwxrwx. 1 root root 24 Apr 30 17:39 S80weblogic_start -> ../init.d/weblogic_start
    lrwxrwxrwx. 1 root root 23 Apr 30 17:39 K20weblogic_stop -> ../init.d/weblogic_stop

 

  • To test first make sure the commands run and work as designed.As root:
    /etc/init.d/weblogic_start
    /etc/init.d/weblogic_stop
  • Next stop is to reboot and verify that the services come up and are functional.