Shell script to start weblogic , forms, reports , ohs instance in 12.2.1.4

Create an env file with following details.

 Note: It is assumed that boot.properties file is configured with weblogic username and password. Otherwise the script will prompt for username and password.

cat /home/oracle/app_env

ORACLE_BASE=/d01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/12.2.1.4; export ORACLE_HOME

MW_HOME=$ORACLE_HOME ; export MW_HOME

WLS_HOME=$MW_HOME/wlserver; export WLS_HOME

WL_HOME=$WLS_HOME  ;export WLS_HOME

DOMAIN_HOME=/d01/app/oracle/product/12.2.1.4/user_projects/domains/prod_domain; export DOMAIN_HOME

JAVA_HOME=/usr/java/jdk1.8.0_231-amd64; export JAVA_HOME

export OHS_INST=/d01/app/oracle/product/12.2.1.4/user_projects/domains/prod_domain/config/fmwconfig/components/OHS/instances/ohs1 ;export OHS_INST

PATH=$JAVA_HOME/bin:$PATH ; export PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export FORMS_PATH=/d01/app/oracle/product/12.2.1.4/forms; export FORMS_PATH

 

Here, ORACLE_BASE stands for oracle base

ORACLE_HOME stands for middleware home

MW_HOME also stands for middleware home

DOMAIN_HOME stands for domain home

OHS_INST stands for Oracle HTTP Server instance home

 

Now create shell script

vi start_services.sh

# Start NodeManager

#!/bin/bash

. /home/oracle/app_env

echo "*************************Starting NodeManager********************************"

nohup $DOMAIN_HOME/bin/startNodeManager.sh > /dev/null 2>&1 &

 

sleep 10

echo "*************************Starting WebLogic********************************"

 

# Start WebLogic Domain

nohup $DOMAIN_HOME/bin/startWebLogic.sh > /dev/null 2>&1 &

 

sleep 60

 

echo "*************************Starting Forms Services ********************************"

 

# Start the managed Servers

nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh WLS_FORMS > /dev/null 2>&1 &

 

sleep 10

 

echo "*************************Starting Reports Services ********************************"

 

nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh WLS_REPORTS > /dev/null 2>&1 &

 

sleep 10

 

echo "*************************Starting Ohs Instance ********************************"

 

# Start the web tier.

$DOMAIN_HOME/bin/startComponent.sh ohs1 > /dev/null 2>&1 &

 

sleep 10

 

echo "*************************Starting Standalone Report Server ********************************"

 

$DOMAIN_HOME/bin/startComponent.sh rep_server1_prod > /dev/null 2>&1 &

 

sleep 10

 

echo "*************************All Services are running. Run this url to check http://192.168.23.12:9001/forms/frmservlet?config=cspprd ********************************"


#chmod 775  start_services.sh


No comments:

Post a Comment