1. 修改dbstart脚本(第78行):
$ vi $ORACLE_HOME/bin/dbstart
ORACLE_HOME_LISTNER=$ORACLE_HOME

2. 修改/etc/oratab为如下格式:
$ vi /etc/oratab
orcl:$ORACLE_HOME:Y


3. 在/etc/rc.d/init.d下添加如下脚本文件,命名为oracle10g:
#!/bin/sh
#chkconfig: 2345 99 01
#description: ORACLE 10g Server
ORACLE_HOME=u/app/oracle/product/10.2.0.1/db_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 是指脚本将为运行级2、3、4、5启动oracle 10g服务,启动优先级为99,关闭优先级为01。
4.添加权限
chmod a+x oracle10g


5.然后以root权限:
# cd /etc/rc2.d
# ln -s /etc/rc.d/init.d/oracle10g S99oracle10g
# chkconfig --add oracle10g
# chkconfig --list oracle10g

--# chkconfig --level 2345 on
--重启系统,就可以在启动的过程中看到Starting oracle,因为我们设置的优先级为99,一般是最后启动。[OK]以后就可以了。因为要启动emctl,可能有点慢,等待的时间要稍微长一点。