Saturday, April 23, 2011

Starting Weblogic Admin Server and Node Manager as background service

The following steps explains how to start Weblogic Node Manager and Admin Server automatically with Linux OS (Redhat in my case):

- Create boot.properties file under

/user_projects/domains/my_domain/servers/AdminServer/security


- Add to the file the following entries

username=weblogic
password=welcome1


- Create a file called wlsndm under

/etc/init.d


- Add to the file the following

#!/bin/bash
#
# wlsndm startup script for node manager
#
# chkconfig: - 74 15
# description: weblogic
# processname: WLSNDM

# Source function library
. /etc/rc.d/init.d/functions

start() {
echo -n $"Starting $prog: "
nohup su - oracle -c /wlserver_10.3/server/bin/startNodeManager.sh > /wlserver_10.3/server/bin/wlsnd.log &
echo "OK"
}

case "$1" in
start)
start
;;
*)
echo $"Usage: $prog {start}"
exit 1
esac

exit 1


- Create a file called wlsadmin under

/etc/init.d


- Add to the file the following

#!/bin/bash
#
# wlsadmin startup script for node manager
#
# chkconfig: - 75 15
# description: weblogic
# processname: WLSADMIN

# Source function library
. /etc/rc.d/init.d/functions

start() {
echo -n $"Starting $prog: "
nohup su - oracle -c /user_projects/domains/my_domain/bin/startWebLogic.sh > /user_projects/domains/my_domain/servers/AdminServer/logs/wlsa.log &
echo "OK"
}

case "$1" in
start)
start
;;
*)
echo $"Usage: $prog {start}"
exit 1
esac

exit 1


- Create the following symbolic links under /etc/rc5.d/

ln -s /etc/init.d/wlsndm S74NodeManager
ln -s /etc/init.d/wlsadmin S75Weblogic


- then Create background services

chkconfig --add wlsadmin
chkconfig --add wlsndm


- Activate the created background services

chkconfig wlsadmin on
chkconfig wlsndm on


Now we have finished creation of background service, and you can start UCM or any other Managed Server from Admin Server Console. Using the same approach you can start UCM automatically.

8 comments:

Anonymous said...

Great post Hisham,

I am trying to run these scripts to start as oracle (not as root). How can I do that?

Many thanks for the great post.

Munir

Anonymous said...

Great post Hisham,

I am trying to run these scripts to start as oracle (not as root). How can I do that?

Many thanks for the great post.

Anonymous said...

Great post Hisham,

I am trying to run these scripts to start as oracle (not as root). How can I do that?

Many thanks for the great post.

Anonymous said...

Great post Hisham,

I am trying to run these scripts to start as oracle (not as root). How can I do that?

Many thanks for the great post.

Munir

Unknown said...

It is already run as Oracle by the line
nohup su - oracle......

So no worries

Does it make sense to you?

idesdemars said...

Hi, i followed your instructions but when i tried starting the services i got "unrecognized service". How can I troubleshoot that? Thanks. Tony

idesdemars said...

Hi, I followed your instructions but when I tried running the services, I got the "unrecognized service" error. How can I troubleshoot that? Thanks.

Ranjit Singh said...

I am not able to find security folder under my SOA domain.I am using weblogic 10.3 and SOA 11g.