Oracle BIEE Start and Stop scripts and oraclebiee start scripts
As a BI developer, it is inevitable to start and stop BI services. The startup process is long and commands need to be switched to different directories. I am so bored that I have specially compiled the startup scripts in linux, save the following script as biee. sh, the subsequent process is quite simple,
Start:./biee. sh start stop:./biee. sh stop restart:./biee restart
Log observation: tail-f/var/log/obiee-start.logtail-f/var/log/obiee-stop.log
The following is the script content, which is saved as a. sh file, and then chmod + x is ready for use.
Of course, if you want to be more lazy, you can make the bash service automatically started.
#! /Bin/bash # configuration based on the actual environment
# Biee Installer
BI_USER = biee
# Biee installation directory
BI_HOME =/home/biee/MiddleWare
# Biee administrator user
BI_ADMIN = weblogic
# Biee administrator password
BIEE_ADMIN_PASSWD = weblogic123
# Domain name BIEE_DOMAIN = bifoundation_domain
# Instance name
BIEE_INSTANCE = instance1
# Server name
BIEE_SERVER = bi_server1
# Admin server URL (hostname: port)
BIEE_MANAGER_URL = dbserver: 7001
# The following information does not need to be modified
WL_PATH = $ BI_HOME/wlserver_10.3/server/binBIEE_PATH = $ BI_HOME/user_projects/domains/$ BIEE_DOMAIN/binORACLE_INSTANCE = $ BI_HOME/instances/$ BIEE_INSTANCE
Export ORACLE_INSTANCE
START_LOG =/var/log/obiee-start.logSTOP_LOG =/var/log/obiee-stop.logSUBSYS = obiee
Start () {echo "************************************* **************************************** * ** "echo" Starting Admin Server on $ (date) "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ BIEE_PATH/startWebLogic. sh-Dweblogic. management. username = $ BI_ADMIN-Dweblogic. management. password = $ BIEE_ADMIN_PASSWD "& wait_for" Server started in RUNNING mode "echo "************************ **************************************** * *************** "echo" Starting Node Manager on $ (date) "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ WL_PATH/startNodeManager. sh "& wait_for" socket listener started on port"
Echo "************************************** **************************************** ** "echo" Starting Managed Server $ BIEE_SERVER on $ (date) "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ BIEE_PATH/startManagedWebLogic. sh $ BIEE_SERVER http: // $ BIEE_MANAGER_URL-Dweblogic. management. username = $ BI_ADMIN-Dweblogic. management. password = $ BIEE_ADMIN_PASSWD "& wait_for" Server started in RUNNING mode"
Echo "************************************** **************************************** ** "echo" Starting BI components on $ (date) "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ ORACLE_INSTANCE/bin/opmnctl startall"
Echo "************************************** **************************************** ** "echo" OBIEE start sequence completed on $ (date) "echo "************************************* **************************************** ***"}
Stop () {echo "************************************* **************************************** * ** "echo" Stopping BI components on $ (date) "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ ORACLE_INSTANCE/bin/opmnctl stopall"
Echo "************************************** **************************************** ** "echo" Stopping Managed Server $ BIEE_SERVER on $ (date) "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ BIEE_PATH/stopManagedWebLogic. sh $ BIEE_SERVER t3: // $ BIEE_MANAGER_URL $ BI_ADMIN $ BIEE_ADMIN_PASSWD"
Echo "************************************** **************************************** ** "echo" Stopping Node Manager on $ (date) "echo "************************************* **************************************** * ** "pkill-TERM-u $ BI_USER-f" weblogic \\. nodeManager "echo "************************************ **************************************** * *** "echo" Stopping Admin Server on $ (date) "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ BIEE_PATH/stopWebLogic. sh $ BI_ADMIN $ BIEE_ADMIN_PASSWD t3: // $ BIEE_MANAGER_URL "echo "********************************* **************************************** * ****** "echo" OBIEE stop sequence completed on $ (date) "echo "************************************* **************************************** ***"}
Wait_for () {res = 0 while [[! $ Res-gt 0] do res =$ (tail-5 "$ START_LOG" | fgrep-c "$1") sleep 5 done}
Case "$1" in start) echo "************************************** **************************************** ** "echo" Starting Oracle Business Intelligence on $ (date) "echo" Logs are sent to $ START_LOG "echo "**************************** **************************************** * *********** "start &> $ START_LOG & touch/var/lock/subsys/$ SUBSYS ;; stop) echo "************************************** **************************************** ** "echo" Stopping Oracle Business Intelligence on $ (date) "echo" Logs are sent to $ STOP_LOG "echo "**************************** **************************************** * *********** "stop &> $ STOP_LOG rm-f/var/lock/subsys/$ SUBSYS ;; status) echo "************************************** **************************************** ** "echo" Oracle BIEE components status .... "echo "************************************* **************************************** * ** "su $ BI_USER-c" $ ORACLE_INSTANCE/bin/opmnctl status ";; restart) $0 stop $0 start; *) echo "Usage: $ (basename $0) start | stop | restart | status" exit 1 esac
Exit 0