17092601_CentOS7(64)下Oracle11g设置开机自启动
1. 环境准备
1.1 系统
操作系统:CentOS 7(64位)
1.2 工具/软件
已安装完成的Oracle11g(64位);
创建数据库实例,本文中数据库实例名:test;$ORACLE_SID:testsid
2. 方法/步骤
2.1 配置/etc/oratab
以root身份登录到linux系统,编辑/etc/oratab文件,找到
testsid:/data/oracle/product/11.2.0/db_1:N
,改为
testsid:/data/oracle/product/11.2.0/db_1:Y
注意:/data/oracle/product/11.2.0/db_1为安装的$ORACLE_HOME,根据情况自行修改路径。
[oracle@zm-centos7 ~]$ su #切换到root
Password: #输入root密码
[root@zm-centos7 oracle]# vim /etc/oratab
[root@zm-centos7 oracle]# cat /etc/oratab
#
tsid:/data/oracle/product/11.2.0/db_1:N# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.# 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.
#
#
testsid:/data/oracle/product/11.2.0/db_1:Y
[root@zm-centos7 oracle]#
2.2 配置/etc/rc.d/rc.local
添加如下行:
su oracle -lc “/data/oracle/product/11.2.0/db_1/bin/lsnrctl start”
su oracle -lc /data/oracle/product/11.2.0/db_1/bin/dbstart
其中第一行因为lsnrctl之后有空格,需要引号,第二行加不加引号都可以。修改完保存退出即可。
代码如下:
[root@zm-centos7 /]# vim /etc/rc.d/rc.local
[root@zm-centos7 /]# cat /etc/rc.d/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
#
17092601_CentOS7(64)下Oracle11g设置开机自启动相关推荐
- Cenots Oracle11g设置开机自启动
Cenots Oracle11g设置开机自启动 1.切换用户,定位路径,编译脚本 su oracle cd /home/oracle vim .bash_profile source .bash_pr ...
- oracle11g设置开机自启动,oracle11g在linux系统下开机自启动设置
oracle服务器一般来说最好是手动启动,这样碰到问题的话,可以现场解决,但是也担心有时候机器故障,自动重启后,为了快速恢复应用,需要自动开机启动oracle,而且发现在不同的os下,启动的设置都不太 ...
- oracle设置开机启动,linux下oracle设置开机自启动实现方法
一.在Linux下启动Oracle 登录到CentOS,切换到oracle用户权限 # su – oracle 接着输入: $ sqlplus "/as sysdba" 原本的画面 ...
- win10下如何设置开机自启动
win+R 输入shell:startup 将快捷方式复制到该文件目录下:
- linux 设置开机自启动服务命令,linux 设置服务开机自启动
8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 前言 由于机房断电,导致服务关闭,在运维人员匆忙的情况下,可能就只重启了机器,很容易就忽视了里面的服务,而对于比较重要的 ...
- linux数据库实例开机启动,linux下数据库实例开机自启动设置
linux下数据库实例开机自启动设置 1.修改/oratab [root@org54 ~]# vi/etc/oratab --把N改为Y,如下提示 # This file is used by ORA ...
- Windows下设置开机自启动的方式(手动/C++代码的形式)
Windows下设置开机自启动的方式(手动/C++代码的形式) Windows下自启动相关软件的原理 首先讲解一下Windows下是如何会实现开机自启动相关软件的原理,由于Windows本身有注册表机 ...
- Windows守护进程实现/设置程序图标/隐藏黑窗/获取exe所在目录/设置开机自启动
功能:实现一个windows守护进程,设置有自定义图标,启动后隐藏黑窗口,获取exe所在目录,并设置开机自启动(需要以管理员权限运行).如果需要打包成可执行的安装包程序,见另一篇博客:https:// ...
- 【Windows工具】QuickLook-3.6.11 安装并设置开机自启动(含较难下载的 QuickLook-3.6.11 安装包百度云盘资源)
1.QuickLook资源链接: https://pan.baidu.com/s/1netQwuSIaYGFatpjLAIYxw 提取码:fcle 2.设置开机自启动 设置开机自启动的方法很多,这里分 ...
最新文章
- 8.Verilog的for循环语句使用
- 走近Java模块化系统OSGi
- 一个注解搞懂 Sentinel,@SentinelResource总结
- 蛇形数组打印(两种形式)
- c++ 线性回归_模型之母:简单线性回归的代码实现
- Python 匿名函数 lambda - Python零基础入门教程
- sublime搭建C/C++编译环境
- Oracle基本数据范例存储名堂浅析
- 数字电路的基础知识(结合Verilog)
- hadoop学习之azkaban(5.1):azkaban的使用及示例 标签: 任务调度hadoopazkaban脚本
- 笔记本无法启用免费wifi
- fresco 显示缩略图,不直接使用setImageURI,防止卡顿和显示不全:纯黑色或纯白色
- .net/C# 实现汉字到拼音转换
- XDOJ32角谷定理
- 《Fundamentals Of Computer Graphics》虎书第三版翻译——第五章 线性代数
- python selenium 不打开浏览器_selenium+python自动化测试--解决无法启动IE浏览器及报错问题...
- 作为一位资深Java程序员应该注意的几点
- 避开“恐怖谷”,机器人的眼睛应该这样开发…
- 构筑全云端数字生态,看游戏工业如何持续进化
- 和用户一起做设计的时代