Advertisements
RSS

Using Upstart to automatically start Weblogic on Linux

18 Sep

upstart80

Recent releases of Ubuntu & RedHat both support Upstart which is a new way to automatically turn programs into daemons so you are able execute them on system start-up. I tried to make my Weblogic domain start automatically on a development Ubuntu server and this is the result.

It only required me to create a few configuration files.

Ubuntu:

For Ubuntu 14.04 the following config files should be placed:

/etc/init/ofmw_admin.conf

start on runlevel [2345]
exec start-stop-daemon --start -u ubuntu -c ubuntu:ubuntu --exec /opt/oracle/config/domains/rbx_dev/bin/startWebLogic.sh

/etc/init/ofmw_nodemgr.conf

start on runlevel [2345]
exec start-stop-daemon --start -u ubuntu -c ubuntu:ubuntu --exec /opt/oracle/config/domains/rbx_dev/nodemanager/startNodeManager.sh

And for each 1-n managed server: /etc/init/ofmw_<managedserver>.conf

start on runlevel [2345]
exec start-stop-daemon --start -u ubuntu -c ubuntu:ubuntu --exec /opt/oracle/config/domains/rbx_dev/bin/startManagedWebLogic.sh soa_server1

RedHat:

RedHat works a little bit different. I couldn’t test it, but it is explained here by Fusion Security:

/etc/init/ofmw_admin.conf

start on runlevel [345]
exec /bin/su - oracle -- /opt/oracle/config/domains/rbx_dev/bin/startWebLogic.sh

/etc/init/ofmw_nodemgr.conf

start on runlevel [345]
exec /bin/su - oracle --/opt/oracle/config/domains/rbx_dev/nodemanager/startNodeManager.sh

 

And for each 1-n managed server: /etc/init/ofmw_<managedserver>.conf

start on runlevel [345]
exec /bin/su - oracle -- /opt/oracle/config/domains/rbx_dev/bin/startManagedWebLogic.sh soa_server1

Commands

With the following commands I’m now able to start, stop and get the status of my daemon:

[ubuntu@rbxdev]# start ofmw_bamserver1
ofmw_bamserver1 start/running, process 9464

[ubuntu@rbxdev]# status ofmw_bamserver1
ofmw_bamserver1 start/running, process 9464

[ubuntu@rbxdev]# stop ofmw_bamserver1
ofmw_bamserver1 stop/waiting

references:

Updates:

  • 2015-12-08: Added nodemanager configuration
Advertisements
 
2 Comments

Posted by on 18-09-2015 in Oracle

 

Tags: ,

2 responses to “Using Upstart to automatically start Weblogic on Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: