1. modify the dbstart Script: $ vi $ Oracle_HOME/bin/dbstart # ORACLE_HOME_LISTNER =/ade/vikrkuma_new/oracleORACLE_HOME_LISTNER = $ ORACLE_HOME2. modify/etc/oratab in the following format: $ vi/etc/oratabSID: $ ORACLE_HOME: Y3. Modify/etc/rc. local implementation
1. Modify the dbstart script:
$ Vi $ Oracle_HOME/bin/dbstart
# ORACLE_HOME_LISTNER =/ade/vikrkuma_new/oracle
ORACLE_HOME_LISTNER = $ ORACLE_HOME
2. Modify/etc/oratab in the following format:
$ Vi/etc/oratab
SID: $ ORACLE_HOME: Y
3. Modify/etc/rc. local to implement automatic startup
# Vi/etc/rc. local
Su-c "$ ORACLE_HOME/bin/dbstart" oracle
Su-c "$ ORACLE_HOME/bin/emctl start dbconsole" oracle restart system check whether the settings are successful.
In addition, use RedHat to start the service implementation:
1. Add the following script file under/etc/rc. d/init. d and name it oracle:
#! /Bin/sh
# Chkconfig: 2345 99 01
# Description: ORACLE 10g Server
ORACLE_HOME =/oracle/product/10.2.0.1
If [! -F $ ORACLE_HOME/bin/dbstart]
Then
Echo "ORACLE cannot start"
Exit
Fi
Case "$1" in
'Start ')
Echo "Starting Oracle Database ..."
Su-oracle-c "$ ORACLE_HOME/bin/dbstart"
Su-oracle-c "$ ORACLE_HOME/bin/emctl start dbconsole"
;;
'Stop ')
Echo "Stoping Oracle Database"
Su-oracle-c "$ ORACLE_HOME/bin/emctl stop dbconsole"
Su-oracle-c "$ ORACLE_HOME/bin/dbshut"
;;
Esac
Chkconfig: 2345 99 01 indicates that the script starts the oracle 10g service at runtime Level 2, 3, 4, and 5, with the startup priority of 99 and the shutdown priority of 01.
2. Then use the root permission:
# Cd/etc/rc2.d
# Ln-s/etc/rc. d/init. d/oracle S99oracle
# Chkconfig -- list oracle
# Chkconfig -- level 2345 on restart the system, you can see Starting oracle during the startup process, because we set the priority to 99, usually the final startup. [OK] Later. It may be a little slow to start emctl, and the waiting time is a little longer.
After the service is started, you can run oracle start or oracle stop as the root user to start or stop the service.