Configuring Oracle self boot on Linux 6

Time:2021-3-26
  • Dbstart, dbshut modification (Oracle user)

The premise is $oracle_ Home environment is set correctly, get $Oracle_ Home value, followed by

sed -i 's/ORACLE_HOME_LISTNER=\$1/ORACLE_HOME_LISTNER=$ORACLE_HOME/g' $ORACLE_HOME/bin/dbstart
sed -i 's/ORACLE_HOME_LISTNER=\$1/ORACLE_HOME_LISTNER=$ORACLE_HOME/g' $ORACLE_HOME/bin/dbshut

#Verification
grep -i "ORACLE_HOME_LISTNER=" $ORACLE_HOME/bin/dbstart
grep -i "ORACLE_HOME_LISTNER=" $ORACLE_HOME/bin/dbshut
  • /Etc / oratab modification (root user)
sed -i 's/:N/:Y/g' /etc/oratab

#Verification
tail /etc/oratab
  • rc.local Boot file configuration (root)

The $Oracle obtained from the previous Oracle user_ Home parameter value
For example, / u01 / APP / Oracle / product / 12.1.0/dbhome.1

echo "su oracle -lc \"/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start\"
su oracle -lc /u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart" >> /etc/rc.d/rc.local

#Verification
tail /etc/rc.d/rc.local