ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 设置linux重启后oracle自动启动的步骤

设置linux重启后oracle自动启动的步骤

原创 Linux操作系统 作者:relis_cheng 时间:2012-04-25 11:22:24 0 删除 编辑

我的过程如下:

1.用root在/etc/rc.d/rc.local(是个文件)中添加下面黄色的内容
[root@ksdb rc.d]# more rc.local;
#!/bin/sh
#
# This script. will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style. init stuff.

touch /var/lock/subsys/local
##the script. add /etc/rc.d/rc.local##
##start db script###
export ORACLE_SID=PROD
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
su - oracle -c "/u01/app/oracle/product/10.2.0/db_1/bin/dbstart"

2.设置:用root在
/etc/oratab中设置下面:
PROD:/u01/app/oracle/product/10.2.0/db_1:Y

把N改成Y

3.修改$ORACLE_HOME/bin/dbstart脚本(先备份dbstart)
注释掉下面一行
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
效果如下:
# Set this to bring up Oracle Net Listener
#ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle

添加下面一行:
export ORACLE_HOME_LISTNER=$ORACLE_HOME

效果:
# Set this to bring up Oracle Net Listener
#ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
export ORACLE_HOME_LISTNER=$ORACLE_HOME

保存dbstart脚本

3.用root.重启,应该就没有问题了

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/119941/viewspace-722177/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-09-16

  • 博文量
    26
  • 访问量
    62337