The environment used here is CentOS 6.6 and has been installed ORACLE11GR2
Oracle boot is divided into two steps:
1. Start monitoring
2. Start the service
Modify Oratab under 1.root User (n should be y):
[Email protected] ~]# vim/etc/oratab mytest:/oracle/product/11.2. 0/db_1:y
2. Switch to Oracle User modification:
[[Email protected] ~] $CD $ORACLE _home/bin[[email protected] bin]$ vim Dbstart
Find oracle_home_listner=$1 this line, modified to:
oracle_home_listner=/oracle/product/11.2.0/
or directly modified to:
oracle_home_listner= $ORACLE _home
Same reason to modify Dbshut
Test run Dbshut, dbstart see if Oracle Services and listener services can be started
3.root User modified under:
[Email protected] ~]# cd/etc/rc.d/init.d/
[Email protected] init.d]# VI Oracle
#!/bin/bash# chkconfig:345 About Ten# Description:startup Script forOracle databases#/etc/init.d/Oracleexport Oracle_sid=oracle# Export Oracle_home_listner=/oracle/product/11.2.0/bin/Export Oracle_base=/apps/Oracleexport Oracle_home=/oracle/product/11.2.0Export PATH= $PATH: $ORACLE _home/bin Case " $" inchstart)suOracle-c $ORACLE _home/bin/DbstartTouch/var/lock/OracleEcho "OK";; Stop)Echo-N"Shutdown Oracle:"suOracle-c $ORACLE _home/bin/DbshutRM-f/var/lock/OracleEcho "OK";;*)Echo "Usage: ' basename $ Start|stop '"Exit1EsacExit0
Save and modify file permissions
chmod 755 /etc/rc.d/init.d/oracle
The following tests can be done as follows:
" ORCL " file /u01/app/product/11.2. 0/db_1/startup.logok
" ORCL " file /u01/app/product/11.2. 0/db_1/shutdown.logok
4. Set Oracle to boot from
--list oracleoracle0: Off 1: Off 2: On 3: on 4: On 5: On 6: Off
Configure ORACLE11GR2 boot from CentOS