Custom .bash_profile for Oracle Fusion Middleware

I have created some crude custom .bash_profile scripts that I use to make things easy for me after I install some of the various Oracle Fusion Middleware products.

Oracle HTTP Server (OHS) 12c

export PS1="\u@\h:\$PWD> "
export DISPLAY=:1
export MW_HOME=/u01/oracle/webtier
export DOMAIN=ohs_domain
export DOMAIN_HOME=${MW_HOME}/user_projects/domains/${DOMAIN}
export JAVA_HOME=/u01/java
export ORACLE_HOME=${MW_HOME}/ohs
export WL_HOME=${MW_HOME}/wlserver
export PATH=$MW_HOME/oracle_common/common/bin:$DOMAIN_HOME/bin:$JAVA_HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin

alias info="source ~/.bash_profile"

echo ""
echo "+----------------------------------------+"
echo "| SHORTCUTS                              |"
echo "+----------------------------------------+"
echo "info"
echo ""

echo ""
echo "+----------------------------------------+"
echo "| OHS START                              |"
echo "+----------------------------------------+"
echo "nohup \$DOMAIN_HOME/bin/startNodeManager.sh >> \$DOMAIN_HOME/bin/NodeManager.out 2>&1 &"
echo "\$DOMAIN_HOME/bin/startComponent.sh ohs1 showErrorStack"

echo ""
echo "+----------------------------------------+"
echo "| OHS STOP                               |"
echo "+----------------------------------------+"
echo "\$DOMAIN_HOME/bin/stopComponent.sh ohs1"
echo "\$DOMAIN_HOME/bin/stopNodeManager.sh"

echo ""

Oracle SOA Suite 12c

export PS1="\u@\h:\$PWD> "
export DISPLAY=:1
export MW_HOME=/u01/oracle/middleware
export DOMAIN=soa_domain
export DOMAIN_HOME=${MW_HOME}/user_projects/domains/${DOMAIN}
export JAVA_HOME=/u01/java
export PATH=$DOMAIN_HOME/bin:$JAVA_HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin

alias info="source ~/.bash_profile"

echo ""
echo "+----------------------------------------+"
echo "| SHORTCUTS                              |"
echo "+----------------------------------------+"
echo "info"
echo ""

echo ""
echo "+----------------------------------------+"
echo "| SOA START                              |"
echo "+----------------------------------------+"
echo "nohup \$DOMAIN_HOME/bin/startNodeManager.sh >> \$DOMAIN_HOME/bin/NodeManager.out 2>&1 &"
echo "nohup \$DOMAIN_HOME/bin/startWebLogic.sh >> \$DOMAIN_HOME/servers/AdminServer/logs/AdminServer.out 2>&1 &"
echo "nohup \$DOMAIN_HOME/bin/startManagedWebLogic.sh bam_server1 http://localhost:7001 >> \$DOMAIN_HOME/servers/bam_server1/logs/bam_server1.out 2>&1 &"
echo "nohup \$DOMAIN_HOME/bin/startManagedWebLogic.sh ess_server1 http://localhost:7001 >> \$DOMAIN_HOME/servers/ess_server1/logs/ess_server1.out 2>&1 &"
echo "nohup \$DOMAIN_HOME/bin/startManagedWebLogic.sh soa_server1 http://localhost:7001 >> \$DOMAIN_HOME/servers/soa_server1/logs/soa_server1.out 2>&1 &"
echo "nohup \$DOMAIN_HOME/bin/startManagedWebLogic.sh ums_server1 http://localhost:7001 >> \$DOMAIN_HOME/servers/ums_server1/logs/ums_server1.out 2>&1 &"

echo ""
echo "+----------------------------------------+"
echo "| SOA STOP                               |"
echo "+----------------------------------------+"
echo "\$DOMAIN_HOME/bin/stopManagedWebLogic.sh ums_server1 t3://localhost:7001"
echo "\$DOMAIN_HOME/bin/stopManagedWebLogic.sh soa_server1 t3://localhost:7001"
echo "\$DOMAIN_HOME/bin/stopManagedWebLogic.sh ess_server1 t3://localhost:7001"
echo "\$DOMAIN_HOME/bin/stopManagedWebLogic.sh bam_server1 t3://localhost:7001"
echo "\$DOMAIN_HOME/bin/stopWebLogic.sh"
echo "\$DOMAIN_HOME/bin/stopNodeManager.sh"

echo ""
echo "+----------------------------------------+"
echo "| SOA STATUS                             |"
echo "+----------------------------------------+"
echo "ps -ef | grep -v grep | grep weblogic.NodeManager"
echo "ps -ef | grep -v grep | grep AdminServer"
echo "ps -ef | grep -v grep | grep soa_server1"

echo ""
echo "+----------------------------------------+"
echo "| SOA LOGS                               |"
echo "+----------------------------------------+"
echo ""
echo "tail -f \$DOMAIN_HOME/bin/NodeManager.out"
echo "tail -f \$DOMAIN_HOME/servers/AdminServer/logs/AdminServer.out"
echo "tail -f \$DOMAIN_HOME/servers/AdminServer/logs/AdminServer.log"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/bam_server1.out"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/bam_server1.log"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/ess_server1.out"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/ess_server1.log"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/soa_server1.out"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/soa_server1.log"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/ums_server1.out"
echo "tail -f \$DOMAIN_HOME/servers/soa_server1/logs/ums_server1.log"

echo ""

Oracle Enterprise Manager (OEM) Agent 12c

export PS1="\u@\h:\$PWD> "
export DISPLAY=:1

export AGENT_HOME=/u01/oracle/agent13c/agent_13.3.0.0.0
export PATH=$AGENT_HOME/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin

alias info="source ~/.bash_profile"

echo ""
echo "+----------------------------------------+"
echo "| SHORTCUTS                              |"
echo "+----------------------------------------+"
echo "info"

echo ""
echo "+----------------------------------------+"
echo "| AGENT START                            |"
echo "+----------------------------------------+"
echo "\$AGENT_HOME/bin/emctl start agent"

echo ""
echo "+----------------------------------------+"
echo "| AGENT STOP                             |"
echo "+----------------------------------------+"
echo "\$AGENT_HOME/bin/emctl stop agent"

echo "+----------------------------------------+"
echo "| AGENT STATUS                           |"
echo "+----------------------------------------+"
echo "\$AGENT_HOME/bin/emctl status agent"

echo ""

Oracle Enterprise Manager (OEM) Cloud Control 13c

export PS1="\u@\h:\$PWD> "
export DISPLAY=:1
export MW_HOME=/u01/app/oracle/middleware
export AGENT_HOME=/u01/app/oracle/agent/agent_13.3.0.0.0
export PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin:$MW_HOME/bin:$AGENT_HOME/bin

alias info="source ~/.bash_profile"

echo ""
echo "+----------------------------------------+"
echo "| SHORTCUTS                              |"
echo "+----------------------------------------+"
echo "info"
echo ""

echo ""
echo "+----------------------------------------+"
echo "| OMS STATUS                             |"
echo "+----------------------------------------+"
echo "\$MW_HOME/bin/emctl start oms"
echo "\$AGENT_HOME/bin/emctl start agent"

echo ""
echo "+----------------------------------------+"
echo "| OMS STOP                               |"
echo "+----------------------------------------+"
echo "\$MW_HOME/bin/emctl stop oms"
echo "\$AGENT_HOME/bin/emctl stop agent"

echo ""
echo "+----------------------------------------+"
echo "| OMS STATUS                             |"
echo "+----------------------------------------+"
echo "\$MW_HOME/bin/emctl status oms -detail"
echo "\$AGENT_HOME/bin/emctl status agent"

echo ""
echo "+----------------------------------------+"
echo "| AGENT DOWNLOAD                         |"
echo "+----------------------------------------+"
echo "emcli login -username=sysman"
echo "emcli sync"
echo "emcli get_supported_platforms"
echo "emcli get_agentimage -destination=/u01/software/agentinstaller -platform=\"Linux x86-64\" -version=\"13.3.0.0.0\""
echo ""

Oracle Database 12c

export PS1="\u@\h:\$PWD> "
export DISPLAY=:1
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1/
export PATH=${ORACLE_HOME}/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin
export ORACLE_SID=oem

alias info="source ~/.bash_profile"

echo ""
echo "+----------------------------------------+"
echo "| SHORTCUTS                              |"
echo "+----------------------------------------+"
echo "info"
echo ""

echo ""
echo "----------------------------------------"
echo "DB START"
echo "----------------------------------------"
echo "lsnrctl start"
echo "sqlplus \"/ as sysdba\""
echo "startup"
echo "ALTER PLUGGABLE DATABASE ALL OPEN READ WRITE;"

echo ""
echo "----------------------------------------"
echo "DB STOP"
echo "----------------------------------------"
echo "sqlplus \"/ as sysdba\""
echo "shutdown immediate"
echo "lsnrctl stop"

echo ""