Monday, October 18, 2010

.bash_profile for Oracle Fusion Middleware 11g

Here is the .bash_profile that we are using for our Oracle Fusion Middleware 11g (specifically Oracle SOA Suite 11g).

Modify the values in red according to your environment.

# ----------------------------------------
# Set these based on your environment
# ----------------------------------------
export DOMAIN=soa_domain
export ORACLE_SHARE=/u01/share
export ORACLE_BASE=/u01/app/oracle
export TMPDIR=/tmp
export JAVA_HOME=$ORACLE_BASE/jrockit1.6.0_29
export ORAINVENTORY=$ORACLE_BASE/oraInventory

# ----------------------------------------

# Shell preferences
# ----------------------------------------
export PS1="\u@\h:\$(pwd)> "
unset LS_COLORS

# ----------------------------------------

# Common SOA Suite 11g environment
# ----------------------------------------
export MW_HOME=$ORACLE_BASE/middleware
export WL_HOME=$MW_HOME/wlserver_10.3
export ORACLE_HOME=$MW_HOME/Oracle_SOA1
export OHS_HOME=$MW_HOME/Oracle_WT1/instances/ohs_instance?
export COHERENCE_HOME=$MW_HOME/coherence
export DOMAIN_HOME=$MW_HOME/user_projects/domains/${DOMAIN}
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/lib:$JAVA_HOME/lib:$COHERENCE_HOME/lib/coherence.jar


# ----------------------------------------
# Path
# ----------------------------------------
export OS_PATH=/usr/local/bin:/bin:/usr/bin:/usr/sbin:.
export PATH=$JAVA_HOME/bin:$COHERENCE_HOME/bin:$PATH:$OS_PATH:.

# ----------------------------------------
# Aliases
# ----------------------------------------
alias cdw='cd $WL_HOME'
alias cdm='cd $MW_HOME'
alias cdj='cd $JAVA_HOME'
alias cdc='cd $COHERENCE_HOME'
alias cda='cd $DOMAIN_HOME/servers/AdminServer'
alias cds='cd $DOMAIN_HOME/servers/soa_server?'
alias cdb='cd $DOMAIN_HOME/servers/bam_server?'
alias cdo='cd $DOMAIN_HOME/servers/osb_server?'
alias cdh='cd $OHS_HOME'
alias cdd='cd $DOMAIN_HOME'


# ----------------------------------------
# Display help
# ----------------------------------------
echo ""
echo "----------------------------------------"
echo "HOSTNAME: `hostname`"
echo "DATE    : `date`"
echo "----------------------------------------"
echo "cdj  -  Go to Java Home"
echo "cdh  -  Go to OHS Home"
echo "cdd  -  Go to Domain Home"
echo "cdc  -  Go to Coherence Home"

echo "cda  -  Go to AdminServer directory"
echo "cds  -  Go to SOA Server directory"
echo "cdb  -  Go to BAM Server directory"
echo "cdo  -  Go to OSB Server directory"

echo ""
echo "----------------------------------------"
echo "NodeManager"
echo "----------------------------------------"
echo "STARTUP:   cd \$MW_HOME/wlserver_10.3/server/bin; nohup \$MW_HOME/wlserver_10.3/server/bin/startNodeManager.sh &"
echo "SHUTDOWN:  ps -ef | grep NodeManager | grep -v grep | awk '{print \$2}' | xargs kill -9"
echo ""
echo "----------------------------------------"
echo "AdminServer"
echo "----------------------------------------"
echo "STARTUP:   cd \$DOMAIN_HOME; nohup \$DOMAIN_HOME/startWebLogic.sh &"
echo "SHUTDOWN:  cd \$DOMAIN_HOME/bin; ./stopWebLogic.sh"
echo ""
echo "----------------------------------------"
echo "Managed Servers"
echo "----------------------------------------"
echo "STARTUP:   Log on to http://localhost:7001/console"
echo "SHUTDOWN:  Log on to http://localhost:7001/console"
echo ""
echo "----------------------------------------"
echo "WebTier"
echo "----------------------------------------"
echo "STARTUP:   cd \$OHS_HOME/bin; ./opmnctl startall"
echo "SHUTDOWN:  cd \$OHS_HOME/bin; ./opmnctl stopall"
echo "----------------------------------------"
echo ""

No comments: