How to start the Admin and Managed Servers using shell script ?


In this post, I will tell you a small trick to start the Admin Server as well as Managed Servers via shell script.
In order to start the servers using shell script, you must create a "boot.properties" file for each and every server you want to start.
If you have no clue of what a boot.properties file is and how to create it, please refer this link given below:
  1. What is a boot.properties file and best usage?

Without further delay, I will tell you how to start the weblogic servers via shell script:
STEPS:
1. Create seperate "boot.properties" for every server you wanted to start via shell script

2. Create shell files corresponding to individual servers:
touch startAdmin.sh
touch startSOA.sh

3. For starting the Admin server via Shell Script, edit the above created "startAdmin.sh" file and add the below lines according to your directory structure and save the file:
command : 
nohup ./<$MW_HOME>/<Domain_home>/<base_domain>/bin/startWebLogic.sh >> /u01/logs/AdminServer.out 2>&1 &

4. For starting the Managed server via Shell Script, edit the above created "startSOA.sh" file and add the below lines according to your directory structure and save the file:
command :
nohup ./<$MW_HOME>/<Domain_home>/<base_domain>/bin/startManagedWebLogic.sh <Managed_Server_Name> <URL of Admin Server> >> /u01/logs/SOAServer.out 2>&1 &
example:
 nohup ./$MW_HOME/user_projects/domain/domain/oracle_domain/bin/startManagedWebLogic.sh soa_server1 http://oracle.demo.com:7001 >> /u01/logs/SOAServer.out 2>&1 &

5. Give the file appropriate permissions and they are good to go.
command : chmod 775 startAdmin.sh
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© Ganesh Sairam's Oracle Blog
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0
Posts RSSComments RSS
Back to top