Advertisements
RSS

Tag Archives: Linux

Using Upstart to automatically start Weblogic on Linux

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: ,

Oracle XE and Ubuntu

>For my personal workstations I’m using .deb-based distro’s (Ubuntu) and no rpm-based distro’s like CentOS/RH/Fedora.

So while trying to install Oracle XE on a VirtualBox Ubuntu 10 instance I started out with downloading “oracle-xe_10.2.0.1-1.0_i386.deb” from the Oracle website. This was actually the 1st mistake I made due to the fact that the next step, using Ubuntu’s dpkg installer to install te package, seems to cause some problems. The software installs, configuration is possible, but starting the database ended up in error. The cause a corrupt database configuration it seems.

Google (my friend) informed me of the fact that I was not alone having these problems and luckily pointed me to answer, this great article from Todd Trichler:

There is now an apt-get repository up on oss.oracle.com for XE.
Just add: deb http://oss.oracle.com/debian unstable main non-free
to /etc/apt/sources.list and then:

# wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add –
# apt-get update
# apt-get install oracle-xe

‘libaio’ and ‘bc’ are in the repository, so dependancies will pull them in if the user doesn’t have them. (Note: You will need to ‘sudo’ or have ‘root’ privileges to install XE.)

 
Leave a comment

Posted by on 05-05-2010 in Oracle

 

Tags: ,