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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WLS Unix rc3.d start/stop scripts

Status
Not open for further replies.

surfbum99

Technical User
May 8, 2006
81
GB
Hi,
Does anyone have a WebLogic rc3.d shell start/stop script which I could use as a template. Also incorporating the Node Manager.
 
Below are the steps for setting up RC script for starting/shutting down the process as UNIX daemon while server reboot.

You must have root access to create RC scripts.


First, we have to setup shell scripts to start and stop Weblogic processes and copy them into the /etc/init.d directory as root user (shown below).

Then we have to create soft links inside /etc/rc3.d directory to point to these stop and start scripts inside /etc/init.d.

The soft links filename starts with some alphanumeric index number which will determine the order in which the process has to start/stop at the time of server reboot.

Content of the WebLogic Start/Stop files would be as below.

The following line is for a start script running as a UNIX daemon to start the WebLogic Admin Server. You can add lines for managed server and node manager processes as well:

su - wlsadmin -c "WL_DOMAIN_HOME/bin/startWebLogic.sh"


The following line is for a stop script running as a UNIX daemon to stop the WebLogic Admin Server. You can add lines for managed server and node manager processes as well:

su - wlsadmin -c "WL_DOMAIN_HOME/bin/stopWebLogic.sh"


The root user will execute the above su command and start the process as the WebLogic process user (in above example, the WebLogic process user is "wlsadmin").

Next, we need (still as root) to set up softlinks inside /etc/rc3.d directory pointing to the start/stop scripts in /etc/init.d.

The soft links filename starts with some alphanumeric index number which will determine the order the process has to start/stop at the time of server reboot (below).

We create soft links using "ln –s" UNIX command.

Note: All the soft links which start with "K" will be called when the server is shutting down, and all the softlinks which start with "S" will be called when server is coming up. This may vary for different flavors of UNIX.

Following is an example where S80weblogic_start is the softlink which is created inside /etc/rc3.d which is calling the weblogic_start script inside /etc/init.d.

The softlink K20weblogic_stop is also shown for the stop process.

lrwxrwxrwx 1 root root 26 Apr 24 16:46 S80weblogic_start -> /etc/init.d/weblogic_start
lrwxrwxrwx 1 root root 25 Apr 24 16:53 K20weblogic_stop -> /etc/init.d/weblogic_stop

Hope this helps.

- Tarun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top