RedHat(Linux) Oracle数据库设置开机自启动
1 首先修改/etc/oratab文件添加如下行:
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
关于/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 field 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.
#
#
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
上面三个参数的意义分别为,实例名、ORACLE HOME、是否允许使用dbstart启动数据库
2 修改文件/etc/rc.d/rc.local,添加如下行:
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
关于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/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
/etc/rc.d/rc.local做为初始化脚本中,的最后一个随开机启动。
RedHat(Linux) Oracle数据库设置开机自启动的更多相关文章
- linux下Oracle数据库实例开机自启动设置
linux下数据库实例开机自启动设置 1.改动/oratab [root@org54 ~]# vi/etc/oratab --把N改为Y,例如以下提示 # This file is used ...
- 配置Oracle数据库的开机自启动
每当数据库服务器重启后,都要重新启动数据库的监听和实例,特别是在服务器断电重启.例行维护性的场景下.能否像Windows服务器一样,让实例和监听随着服务的启动而启动呢?答案当然是肯定的,我们可以利用O ...
- Linux服务器,服务管理--systemctl命令详解,设置开机自启动
Linux服务器,服务管理--systemctl命令详解,设置开机自启动 syetemclt就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了. 摘要: syst ...
- CentOS 6下 Oracle11gR2 设置开机自启动
[1] 更改/etc/oratab # This file is used by ORACLE utilities. It is created by root.sh # and updated by ...
- 设置开机自启动VirtualBox虚拟机系统
如果常用VirtualBox虚拟机系统的话,设置个随开机启动也是很方便的.不需要打开VirtualBox窗口,直接就是系统启动了. 又继续上网搜索学习了.(设置开机自启动VirtualBox虚拟机系统 ...
- Linux中如何设置服务自启动?
转自:Linux中如何设置服务自启动? 有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务,主要用三种方式进行这一操作: ln -s 在/etc/rc.d/rc ...
- Linux 系统设置sh文件开机自启动
工作中有一个linux下的服务需要启动,但是机器总是断电,导致需要反复启动,找了一下开机自启动的方法,解决了这个问题.Linux设置开机自启动非常简单,只要找到rc.local文件,将你需要自启动的文 ...
- Ubuntu14.04设置开机自启动脚本
方法一.编辑rc.loacl脚本 Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本.在 exit 0 前面添加好脚本代码, ...
- linux下配置tomcat开机自启动
Linux下配置tomcat开机自启动 1.写一个tomcat脚本,内容如下,设置其权限为755,放在/etc/init.d/目录下 #!/bin/bash## /etc/init.d/tomca ...
随机推荐
- Ajax(Asychronous JavaScript and XML)笔记
1 Ajax简介 1 ajax概念 2 什么是同步?什么是异步? 3 ajax原理 2 JavaScript原生的ajax 1 ajax.html代码 <!DOCTYPE html> &l ...
- 已有插件支持requirejs
define(["jquery"], // Require jquery function($){ //把你原来的插件代码放这里吧,这样就行了 //注意文件命名 }) ...
- pycurl安装问题
pycurl安装问题 之前人写的代码中依赖pycurl,所以准备在ubuntu14.04.4 LTS系统上安装一下.发现了不少问题. Could not run curl-config 最开始遇到问题 ...
- 网易和淘宝的rem方案剖析
以下内容到分割线前是引用前端大牛的文章,方便大家理解博主内容): 从网易与淘宝的font-size思考前端设计稿与工作流 1. 简单问题简单解决 我觉得有些web app并一定很复杂,比如拉勾网,你看 ...
- Javascript与jQuery方法的隐藏与显示
如题,代码奉上. <html> <head> <title>denotoggle</title> <style> #box { width: ...
- java 并发(五)---AbstractQueuedSynchronizer(2)
文章部分代码和照片来自参考资料 问题 : ConditionObject 的 await 和 signal 方法是如何实现的 ConditonObject ConditionObjec ...
- Python下ImportError: DLL load failed: 找不到指定的模块
环境:Anaconda3 Python3.7 scarpy1.5 版本似乎都能对的上.但是在cmd下报错 如下截图. 从以上错误来看,应该是lxml包有异常. pip uninstall lxml包. ...
- Flash流媒体服务器软件
所谓流媒体技术,是指将连续的影像和声音信息经过压缩处理后放在网站服务器上,让用户能够一边下载一边观看.收听(即所谓的“在线欣赏”),而不需要等整个压缩文件下载到自己的机器上才可以欣赏的网络传输技术.目 ...
- 从Java虚拟机角度分析类的实例化顺序
1.首先展示一下实例代码(Son.java & Father.java) public class Father { public static int a=10;//父类的静态变量 stat ...
- 最近使用日期控件时,用到了My97DatePicker控件,单日期控件,记录一下
以上是使用时的效果,可以自己设定日期有效区间,如下图: 对于起始日期和终止日期的控制如下: <td> <label >起始日期:</label> <input ...