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 ...
随机推荐
- 【linux】虚拟机内装Linux系统的ssh访问
一般在虚拟机内安装一个Linux系统,虚拟机网络设置为桥接后,Linux系统会在安装的过程中自动设置其为dhcp配置,会给其随机分配一个ip,这个ip可以用命令 "ifconfig" ...
- java ee的map
- Java String StringBuilder StringBuffer
String是字符串常量 StringBuilder和StringBuffer都是字符串变量 速度方面:StringBuilder > StringBuffer > String 每当用S ...
- 存储器的保护(三)——《x86汇编语言:从实模式到保护模式》读书笔记20
存储器的保护(三) 修改本章代码清单,使之可以检测1MB以上的内存空间(从地址0x0010_0000开始,不考虑高速缓存的影响).要求:对内存的读写按双字的长度进行,并在检测的同时显示已检测的内存数量 ...
- Bash编程(5) Shell方法
shell的方法在相同的进程内执行,与调用它的脚本一致.对于方法来说,脚本中的所有变量均可见,且不需要执行export.方法中可以创建局部变量,且不影响正在调用的脚本. 1. 定义语法 (1) Kor ...
- 模拟登陆Github示例
首先进入github登录页:https://github.com/login 输入账号密码,打开开发者工具,在Network页勾选上Preserve Log(显示持续日志),点击登录,查看Sessio ...
- no jpeg in java.library.path;java.lang.NoClassDefFoundError: Could not initialize class sun.awt.image.codec.JPEGImageEncoderImpl
no jpeg in java.library.path;java.lang.NoClassDefFoundError: Could not initialize class sun.awt.imag ...
- master.sys.sysprocesses相关内容
sysprocesses 表中保存关于运行在 Microsoft® SQL Server™ 上的进程的信息.这些进程可以是客户端进程或系统进程. sysprocesses 只存储在 master 数据 ...
- RabbitMQ - 远程过程调用
试着用RabbitMQ进行RPC. 其实用RabbitMQ搞RPC也没什么特别的.只是我们需要在请求中再加入一个callback queue.比如这样: callbackQueueName = cha ...
- easyui前后台转义字符和普通字符的相互转换问题
昨天碰到一个问题,公司前端使用的是easyui和jquery,页面textarea编写了html代码,传入后台变成了<>类型代码,这样保存到数据库是没有问题的,但是在页面显示的时候需要显示 ...