Sunucumuzu start ettiğimizde çalışacak scripti aşağıdaki gibi düzenliyoruz.
/etc/init.d/obiee dosyasını oluşturup içerisine aşağıdaki scripti kopyalıyoruz. Gerekli değişiklikleri kendi sistemimize uygun olarak yapıyoruz.
# vi /etc/init.d/obiee
#!/bin/bash
#
# File: /etc/init.d/obiee
# Purpose: Start and stop Oracle Business Intelligence 11g components.
#
# chkconfig: 2345 99 10
# description: Manage OBIEE service.
#
# Aşağıdaki değişkenleri kendi sistemimize göre ayarlıyoruz.
#kurulum yaptığımız kullanıcı
ORACLE_OWNR=oracle
#middleware home dizinin yolu
ORACLE_FMW=/u01/MiddlewareHome
#kurulum esnasında belirledğimiz kullanıcı adı ve şifre
BIEE_USER=weblogic
BIEE_PASSWD=parolamiz
#kurulum sırasında belirlediğimiz domain-instance isimleri
BIEE_DOMAIN=bifoundation_domain
BIEE_INSTANCE=instance1
#BI sunucumuzun bilgileri
BIEE_SERVER=biserver
BIEE_MANAGER_URL=biserver.veys.com:7001
# Aşağıdaki kısımlar değişiklik gerektirmiyor.
WL_PATH=$ORACLE_FMW/wlserver_10.3/server/bin
BIEE_PATH=$ORACLE_FMW/user_projects/domains/$BIEE_DOMAIN/bin
ORACLE_INSTANCE=$ORACLE_FMW/instances/$BIEE_INSTANCE
export ORACLE_INSTANCE
START_LOG=/var/log/obiee-start.log
STOP_LOG=/var/log/obiee-stop.log
SUBSYS=obiee
start() {
echo "********************************************************************************"
echo " Admin Server Başlatılıyor $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/startWebLogic.sh" &
wait_for "Server started in RUNNING mode"
echo "********************************************************************************"
echo "Node Manager Başlatılıyor $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$WL_PATH/startNodeManager.sh" &
wait_for "socket listener started on port"
echo "********************************************************************************"
echo "Managed Server Başlatılıyor $BIEE_SERVER on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/startManagedWebLogic.sh $BIEE_SERVER http://$BIEE_MANAGER_URL" &
wait_for "Server started in RUNNING mode"
echo "********************************************************************************"
echo " BI components Başlatılıyor on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -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 $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl stopall"
echo "********************************************************************************"
echo "Stopping Managed Server $BIEE_SERVER on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/stopManagedWebLogic.sh $BIEE_SERVER t3://$BIEE_MANAGER_URL $BIEE_USER $BIEE_PASSWD"
echo "********************************************************************************"
echo "Stopping Node Manager on $(date)"
echo "********************************************************************************"
pkill -TERM -u $ORACLE_OWNR -f "weblogic\\.NodeManager"
echo "********************************************************************************"
echo "Stopping Admin Server on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/stopWebLogic.sh"
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 $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl status"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $(basename $0) start|stop|restart|status"
exit 1
esac
exit 0
Scriptimizi hazırladıktan sonra sunucumuz başladığında otomatik olarak scriptin çalışması için gereken konfigürasyonları işletim sistemimiz üzerinde yapıyoruz.
# chkconfig --add obiee
# chkconfig obiee on
# chmod 750 /etc/init.d/obiee
Oracle BI servislerimizi Manual olarak başlatmak durdurmak yada sorgulamak için aşağıdaki komutları kullanabiliriz
# service obiee start
# service obiee stop
# service obiee status
İyi Çalışmalar
# chkconfig --add obiee
# chkconfig obiee on
# chmod 750 /etc/init.d/obiee
Oracle BI servislerimizi Manual olarak başlatmak durdurmak yada sorgulamak için aşağıdaki komutları kullanabiliriz
# service obiee start
# service obiee stop
# service obiee status
İyi Çalışmalar
0 yorum:
Yorum Gönder