I. Modification of/ETC/ORATAB
#orcl:/u01/app/oracle/product/11gr2:norcl:/u01/app/oracle/product/11gr2:y change "N" to "Y"
Second, modify the/u01/app/oracle/product/11gr2/bin directory Dbstart and Dbshut
Remove a comment
Oratab=/etc/oratab
Change oracle_home_listner=$1 to Oracle's installation directory
Oracle_home_listner=/u01/app/oracle/product/11gr2
"echo" Processing $INST \ "$ORACLE _sid\": Log file $ORACLE _home/startup.log "" Comment
Remove a comment
Oratab=/etc/oratab
Change oracle_home_listner=$1 to Oracle's installation directory
Oracle_home_listner=/u01/app/oracle/product/11gr2
Add "chmod 766 $LOG" under "log= $ORACLE _home/shutdown.log"
log= $ORACLE _home/shutdown.log
Chomod 766 $LOG
Iii. adding Oracle to System services
#!/bin/sh# chkconfig:345 # description:oracle 11g AutoRun Services#/etc/init.d/oracle## Run-level Startup Script forThe Oracle Instance, Listener, and# Web interfaceexport oracle_base=/u01/app/Oracleexport Oracle_home=/u01/app/oracle/product/11gr2export Oracle_sid=Orclexport PATH= $PATH: $ORACLE _home/BINORA_OWNR="Oracle"# ifThe executables DoNot exist--Display Errorif[!-F $ORACLE _home/bin/dbstart-o!d $ORACLE _home] Then Echo "Oracle startup:cannot Start"Exit1fi# depending on parameter--startup, shutdown, restart# of the instance and listener or usage display Case " $" inchstart) # Oracle Listener and instance startupsu$ORA _OWNR-LC $ORACLE _home/bin/DbstartEcho "Oracle start OK ..." Sleep 1;; stop) # Oracle Listener and instance shutdownsu$ORA _OWNR-LC $ORACLE _home/bin/DbshutEcho "Oracle Stop OK ..." Sleep 1;; Reload|restart) $0Stop $0start;;*) Echo$"Usage: ' basename $ ' {start|stop|reload|reload}"Exit1EsacExit0
[Email protected] ~]# chkconfig--add Oracle
[[email protected] ~]# Chkconfig Oracle on
Oracle 11g Boot Service starts