Linux下Oracle开机自启动
原文地址:http://blog.csdn.net/cscscscsc/article/details/51044541
1.用oracle用户编辑dbstart文件
登入oracle用户,切换到$ORACLE_HOME/bin目录下,修改文件dbstart。
- [oracle@ST ~]$ vi /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
修改:看下面注释部分进行修改。
- LOGMSG="logger -puser.alert -s "
- trap 'exit' 1 2 3
- # for script tracing
- case $ORACLE_TRACE in
- T) set -x ;;
- esac
- # Set path if path not set (if called from /etc/rc)
- SAVE_PATH=/bin:/usr/bin:/etc:${PATH} ; export PATH
- SAVE_LLP=$LD_LIBRARY_PATH
- # First argument is used to bring up Oracle Net Listener
- ORACLE_HOME_LISTNER=$ORACLE_HOME --这里原本是$1,这里改成$ORACLE_HOME即可。
- if [ ! $ORACLE_HOME_LISTNER ] ; then
- echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
- echo "Usage: $0 ORACLE_HOME"
- else
2.用root用户编辑文件oratab和rc.local
参照下面的注释部分进行修改。
- [root@ST ~]# vi /etc/oratab
- # This file is used by ORACLE utilities. It is created by root.sh
- # and updated by either Database Configuration Assistant while creating
- # a database or ASM Configuration Assistant while creating ASM instance.
- # A colon, ':', is used as the field terminator. A new line terminates
- # the entry. Lines beginning with a pound sign, '#', are comments.
- #
- # Entries are of the form:
- # $ORACLE_SID:$ORACLE_HOME:<N|Y>:
- #
- # The first and second fields are the system identifier and home
- # directory of the database respectively. The third filed indicates
- # to the dbstart utility that the database should , "Y", or should not,
- # "N", be brought up at system boot time.
- #
- # Multiple entries with the same $ORACLE_SID are not allowed.
- #
- #
- orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y --这里原本是N,改成Y即可。
- [root@ST ~]# vi /etc/rc.d/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
- --在空白处添加下面两句话。
- su oracle -lc "/u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
- su oracle -lc /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
所有这些步骤做完了,就配置好了Oracle在Linux下的自启动了。
Linux下Oracle开机自启动相关推荐
- linux下oracle开机自启动,Linux下开机自动启动Oracle的设置
让我手动启动数据库,我决定花点时间研究下Oracle随Linux自动重启的设置,具体方法如下: 因为办公室突然停电,服务器重启后,数据库并没有跟着重启,,我才发现原来所有的数据库都没有设置开机自动重启 ...
- Linux设置Oracle开机自启动
Linux设置Oracle开机自启动 目录 1.编辑oratab 1 2.编辑rc.local 2 3.listener.log的权限 3 4.编辑dbstart 3 5.测试 ...
- linux 下tomcat开机自启动
linux 下tomcat开机自启动 修改Tomcat/bin/startup.sh 为: export JAVA_HOME=/usr/java/j2sdk1.4.2_08 export CLASSP ...
- linux下redis开机自启动
系统开机启动时会去加载/etc/init.d/下面的脚本,通常而言每个脚本文件会自定义实现程序的启动:若想将新的程序开机自启动,只需在该目录下添加一个自定义启动程序的脚本,然后设置相应规则即可. 修改 ...
- linux开机启动mysql脚本,ubuntu linux下mysql开机自启动 - 心之所向,无惧无悔! - 博客频道 - CSDN.NET...
1. 预使mysql开机自启动,首先需要注册mysql为ubuntu下的服务. 直接拷贝MySQL.server文件至/etc/init.d/目录下即可. sudo cp $MYSQL_HOME/su ...
- sphinx在window下和linux下加入开机自启动
linux下加入etc的rc.local即可 window下 searchd –-install -–config d:/csft3.1/bin/xxxx.conf 相应的删除服务命令为: searc ...
- linux数据库实例开机启动不了,linux下Oracle数据库实例开机自启动设置
linux下数据库实例开机自启动设置 1.改动/oratab [root@org54 ~]# vi/etc/oratab --把N改为Y,例如以下提示 # This file is used ...
- LINUX环境:MySQL和Oracle开机自启动
MySQL配置自启动 #将MySQL的启动服务添加到系统服务中,设置开机自启动:(chkconfig 命令redhat系统的) 创建软连接: [root@ethan-testdb ~]# ln -s ...
- linux设置开机自启服务,linux设置服务开机自启动的三种方式
linux设置服务开机自启动的三种方式 这里介绍一下linux开机自动启动的几种方法,共计3种,大家可以借鉴一下!经验里面以centos 5.3系统为例! 方法1:.利用ntsysv命令进行设置,利用 ...
最新文章
- jQuery获取Select选择的Text和 Value(转)
- 用函数计算搭建页面的前端CICD系统,提升访问体验
- cannot convert value of type ‘org.codehaus.xfire.spring.editors.ServiceFactoryEditor
- (BFS)Catch That Cow(poj3278)
- libspark,不懂日文怎么学……
- python应用系列教程——python中ftp操作:连接、登录、获取目录,重定向、上传下载,删除更改
- 新用户如何查看苹果/Mac电脑的硬件配置?
- 如何用手机编程Python?
- SPSS学习 (一)概述
- 阳阳智能开关固件2.0版本
- 人工智能实验:猴子摘香蕉问题(Python代码实现)
- Python爬虫获取电影链接(续)
- Blockstack: A Global Naming and Storage System Secured by Blockchains
- 【循环搜寻法(使用卫兵)】
- 电线超负荷的危险与原因
- php 图片大小更改,word图片怎么统一调整大小
- 前端_快速入门Vue.js框架
- RabbitMQ消息队列工作原理及集成使用
- (转)SCI写作技巧
- 考研复试_英语面试_必备的30个问题
热门文章
- 解决windows10和ubuntu16.04双系统切换时Windows时间不对的问题
- [Office] WPS Excel通过添加宏实现多张表格合并
- 专访阿里金融云徐敏:为普惠金融地提供技术原力
- 2022海外流媒体十大技术趋势
- ubuntu18.04已匹配蓝牙耳机但是连接不上
- 计算机光驱图标符号,电脑不显示光驱图标怎么解决
- webRTC(十五):webrtc 文件实时传输
- 最近迅雷 4.0正式发布!教你轻松精简你的迅雷4.0~
- 干货分享|只发摘要也可以被SCIE检索吗?
- html5调用安卓锁屏,HTML5实现APP永不锁屏