Redhat Enterprise Linux 7 Uzerinde Oracle 12c Database Kurulumu-OS Customization
Database’in otomatik olarak start olması için aşağıdaki conf dosyaları düzenlenmelidir.
vi /etc/oratabORACLEDB:/u01/app/oracle/product/12.1.0.1/db_1:Y
$1 içeren aşağıdaki dosyalarda ORACLE_HOME_LISTNER=$ORACLE_HOME Dizini Set Edilir.
$ORACLE_HOME/bin/dbstart $ORACLE_HOME/bin/dbshut
Linux servisi oluşturmak için aşağıdaki init oluşturulur.
vi /etc/init.d/dbora
dbora init dosya içeriği
#! /bin/sh -x # # Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation.ORACLE_HOME=/u01/app/oracle/product/12.1.0.1/db_1 # # Change the value of ORACLE to the login name of the # oracle owner at your site. # ORACLE=oraclePATH=${PATH}:$ORACLE_HOME/bin HOST=`hostname` PLATFORM=`uname` export ORACLE_HOME /u01/app/oracle/product/12.1.0.1/db_1 export ORACLE_SID=ORACLEDB # if [ ! "$2" = "ORACLEDB" ] ; then rsh $HOST -l $ORACLE $0 $1 ORACLEDB if [ "$PLATFORM" = "Linux" ] ; then touch /var/lock/subsys/dbora fi exit fi fi # case $1 in 'start') $ORACLE_HOME/bin/dbstart $ORACLE_HOME & ;; 'stop') $ORACLE_HOME/bin/dbshut $ORACLE_HOME & ;; *) echo "usage: $0 {start|stop}" exit ;; esac # exit
Dosyayla ilgili Aşağıdaki yetkilendirmeler yapılır.
chkconfig --add dbora chgrp dba /etc/init.d/dbora chmod 750 /etc/init.d/dbora ls -al /etc/init.d/dbora
Servisin start olması için sembolik linkler oluşturulmalıdır.
ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
İlgili Linkler
http://docs.oracle.com/cd/E16655_01/server.121/e10638/strt_stp.htm#UNXAR150
http://www.oracle-base.com/articles/linux/automating-database-startup-and-shutdown-on-linux.php