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:
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
0 comments