原文地址:http://blog.csdn.net/cscscscsc/article/details/51044541

1.用oracle用户编辑dbstart文件

登入oracle用户,切换到$ORACLE_HOME/bin目录下,修改文件dbstart。

[sql] view plain copy
  1. [oracle@ST ~]$ vi /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart

修改:看下面注释部分进行修改。

[sql] view plain copy
  1. LOGMSG="logger -puser.alert -s "
  2. trap 'exit' 1 2 3
  3. # for script tracing
  4. case $ORACLE_TRACE in
  5. T) set -x ;;
  6. esac
  7. # Set path if path not set (if called from /etc/rc)
  8. SAVE_PATH=/bin:/usr/bin:/etc:${PATH} ; export PATH
  9. SAVE_LLP=$LD_LIBRARY_PATH
  10. # First argument is used to bring up Oracle Net Listener
  11. ORACLE_HOME_LISTNER=$ORACLE_HOME    --这里原本是$1,这里改成$ORACLE_HOME即可。
  12. if [ ! $ORACLE_HOME_LISTNER ] ; then
  13. echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
  14. echo "Usage: $0 ORACLE_HOME"
  15. else

2.用root用户编辑文件oratab和rc.local

参照下面的注释部分进行修改。

[sql] view plain copy
  1. [root@ST ~]# vi /etc/oratab
  2. # This file is used by ORACLE utilities.  It is created by root.sh
  3. # and updated by either Database Configuration Assistant while creating
  4. # a database or ASM Configuration Assistant while creating ASM instance.
  5. # A colon, ':', is used as the field terminator.  A new line terminates
  6. # the entry.  Lines beginning with a pound sign, '#', are comments.
  7. #
  8. # Entries are of the form:
  9. #   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
  10. #
  11. # The first and second fields are the system identifier and home
  12. # directory of the database respectively.  The third filed indicates
  13. # to the dbstart utility that the database should , "Y", or should not,
  14. # "N", be brought up at system boot time.
  15. #
  16. # Multiple entries with the same $ORACLE_SID are not allowed.
  17. #
  18. #
  19. orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y   --这里原本是N,改成Y即可。
[sql] view plain copy
  1. [root@ST ~]# vi /etc/rc.d/rc.local
  2. #!/bin/sh
  3. #
  4. # This script will be executed *after* all the other init scripts.
  5. # You can put your own initialization stuff in here if you don't
  6. # want to do the full Sys V style init stuff.
  7. touch /var/lock/subsys/local
  8. --在空白处添加下面两句话。
  9. su oracle -lc "/u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
  10. su oracle -lc  /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart

所有这些步骤做完了,就配置好了Oracle在Linux下的自启动了。

Linux下Oracle开机自启动相关推荐

  1. linux下oracle开机自启动,Linux下开机自动启动Oracle的设置

    让我手动启动数据库,我决定花点时间研究下Oracle随Linux自动重启的设置,具体方法如下: 因为办公室突然停电,服务器重启后,数据库并没有跟着重启,,我才发现原来所有的数据库都没有设置开机自动重启 ...

  2. Linux设置Oracle开机自启动

    Linux设置Oracle开机自启动 目录 1.编辑oratab    1 2.编辑rc.local    2 3.listener.log的权限    3 4.编辑dbstart    3 5.测试 ...

  3. linux 下tomcat开机自启动

    linux 下tomcat开机自启动 修改Tomcat/bin/startup.sh 为: export JAVA_HOME=/usr/java/j2sdk1.4.2_08 export CLASSP ...

  4. linux下redis开机自启动

    系统开机启动时会去加载/etc/init.d/下面的脚本,通常而言每个脚本文件会自定义实现程序的启动:若想将新的程序开机自启动,只需在该目录下添加一个自定义启动程序的脚本,然后设置相应规则即可. 修改 ...

  5. linux开机启动mysql脚本,ubuntu linux下mysql开机自启动 - 心之所向,无惧无悔! - 博客频道 - CSDN.NET...

    1. 预使mysql开机自启动,首先需要注册mysql为ubuntu下的服务. 直接拷贝MySQL.server文件至/etc/init.d/目录下即可. sudo cp $MYSQL_HOME/su ...

  6. sphinx在window下和linux下加入开机自启动

    linux下加入etc的rc.local即可 window下 searchd –-install -–config d:/csft3.1/bin/xxxx.conf 相应的删除服务命令为: searc ...

  7. linux数据库实例开机启动不了,linux下Oracle数据库实例开机自启动设置

    linux下数据库实例开机自启动设置 1.改动/oratab [root@org54 ~]# vi/etc/oratab     --把N改为Y,例如以下提示 # This file is used ...

  8. LINUX环境:MySQL和Oracle开机自启动

    MySQL配置自启动 #将MySQL的启动服务添加到系统服务中,设置开机自启动:(chkconfig 命令redhat系统的) 创建软连接: [root@ethan-testdb ~]# ln -s ...

  9. linux设置开机自启服务,linux设置服务开机自启动的三种方式

    linux设置服务开机自启动的三种方式 这里介绍一下linux开机自动启动的几种方法,共计3种,大家可以借鉴一下!经验里面以centos 5.3系统为例! 方法1:.利用ntsysv命令进行设置,利用 ...

最新文章

  1. jQuery获取Select选择的Text和 Value(转)
  2. 用函数计算搭建页面的前端CICD系统,提升访问体验
  3. cannot convert value of type ‘org.codehaus.xfire.spring.editors.ServiceFactoryEditor
  4. (BFS)Catch That Cow(poj3278)
  5. libspark,不懂日文怎么学……
  6. python应用系列教程——python中ftp操作:连接、登录、获取目录,重定向、上传下载,删除更改
  7. 新用户如何查看苹果/Mac电脑的硬件配置?
  8. 如何用手机编程Python?
  9. SPSS学习 (一)概述
  10. 阳阳智能开关固件2.0版本
  11. 人工智能实验:猴子摘香蕉问题(Python代码实现)
  12. Python爬虫获取电影链接(续)
  13. Blockstack: A Global Naming and Storage System Secured by Blockchains
  14. 【循环搜寻法(使用卫兵)】
  15. 电线超负荷的危险与原因
  16. php 图片大小更改,word图片怎么统一调整大小
  17. 前端_快速入门Vue.js框架
  18. RabbitMQ消息队列工作原理及集成使用
  19. (转)SCI写作技巧
  20. 考研复试_英语面试_必备的30个问题

热门文章

  1. 解决windows10和ubuntu16.04双系统切换时Windows时间不对的问题
  2. [Office] WPS Excel通过添加宏实现多张表格合并
  3. 专访阿里金融云徐敏:为普惠金融地提供技术原力
  4. 2022海外流媒体十大技术趋势
  5. ubuntu18.04已匹配蓝牙耳机但是连接不上
  6. 计算机光驱图标符号,电脑不显示光驱图标怎么解决
  7. webRTC(十五):webrtc 文件实时传输
  8. 最近迅雷 4.0正式发布!教你轻松精简你的迅雷4.0~
  9. 干货分享|只发摘要也可以被SCIE检索吗?
  10. html5调用安卓锁屏,HTML5实现APP永不锁屏