linux服务器下oracle开机自启动设置
1、首先切换到Oracle用户
[oracle@oracletest ~]$ cd /u01/app/oracle/product/11.2.0/db_1/bin/ -----标红字体部分数据库可能不一样,有的是dbhome_1,以自己实际配置目录为准
[oracle@oracletest bin]$ vi dbstart
LOGMSG="logger -puser.alert -s " trap 'exit' # 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
LOG=$ORACLE_HOME_LISTNER/listener.log
2、用root用户编辑oratab和rc.local
[root@oracletest ~]# 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.
#
#
oadb:/u01/app/oracle/product/11.2./db_1:Y ###此处原来是N,改为Y
[root@oracletest ~]# 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
#####在空白处添加下面两行,其中标红字体部分数据库可能不一样,有的是dbhome_1,以自己实际配置目录为准
su oracle -lc "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start"
su oracle -lc /u01/app/oracle/product/11.2./db_1/bin/dbstart
经过上面两步操作,数据库服务器重启后,数据库也会自动启动。
以上均为实际操作示例,最终参考如下链接,致谢
https://blog.csdn.net/kepa520/article/details/78968180
linux服务器下oracle开机自启动设置的更多相关文章
- 【tomcat环境搭建】Linux和Windows下tomcat开机自启动设置
目前很多项目都部署在tomcat上,频繁操作中,每次启动或关闭tomcat都稍显麻烦,那如何设置tomcat的开机自启动? Linux下tomcat的开机自启动设置 网上主要有两种方式,一种是shel ...
- Linux和Windows下tomcat开机自启动设置
Linux下tomcat的开机自启动设置 1.修改系统文件rc.local:vi /etc/rc.d/rc.local rc.local是给用户自定义启动时需要执行的文件,和windows里面的“启动 ...
- Linux环境下Oracle安装参数设置
前面讲了虚拟机的设置和OracleLinux的安装,接下来我们来说下Oracle安装前的准备工作.1.系统信息查看系统信息查看首先服务器ip:192.168.8.120服务器系统:Oracle Lin ...
- win7下redis开机自启动设置
win7下安装完redis之后,每次开机都得用cmd命令行启动redis,所以就想办法实现开机自启动redis. 一.把启动命令写入bat: E:\redis\redis-server.exe E:\ ...
- 设置linux下oracle开机自启动
1.修改配置文件,vi /etc/oratab orcl:/u01/app/oracle/product/11.2.0/db_1:Y 2.创建启动文件,/etc/init.d/ #!/bin/sh # ...
- Linux下oracle开机自启动服务
如果每次重启操作系统都要进行以上操作好麻烦,那么如何让Oracle作为系统服务在开机的时候自动启动呢? Oracle在$ORACLE_HOME/bin下提供许多对数据库进行操作的脚本,其中dbstar ...
- linux下Oracle数据库实例开机自启动设置
linux下数据库实例开机自启动设置 1.改动/oratab [root@org54 ~]# vi/etc/oratab --把N改为Y,例如以下提示 # This file is used ...
- Linux服务器下对Oracle作Rman备份
由于工作需要,最近要对几台Linux系统下的Oracle数据库进行Rman备份,就在操作的同时,整理了一下,方便今后作为资料进行查阅. ------------------------Linux服务器 ...
- linux环境下oracle 11g 静默安装
安装环境 Linux服务器:oracle linux 6.6 64位 Oracle服务器:Oracle11gR2 64位 系统要求 1.Linux安装Oracle系统要求 系统要求 说明 内存 必须高 ...
随机推荐
- Aery的UE4 C++游戏开发之旅(3)蓝图
目录 蓝图 蓝图命名规范 蓝图优化 暴露C++至蓝图 暴露C++类 暴露C++属性 暴露C++函数 暴露C++结构体/枚举 暴露C++接口 蓝图和C++的结合方案 使用继承重写蓝图 使用组合重写蓝图 ...
- 【红宝书】第20章.JSON
JSON是一种轻量级的数据格式.JSON使用JS语法的子集表示对象.数组.字符串.数值.布尔值和null,不支持undefined JSON.stringify() // JSON.stringi ...
- Nginx+Tomcat8+Memcached实现负载均衡及session共享
1> 基础环境 简易拓扑图: 2> 部署Tomcat [root@node01 ~]# ll -h ~ |egrep 'jdk|tomcat'-rw-r--r-- 1 root root ...
- Microsemi Libero系列教程(二)——新建点灯工程
前言 上一篇文章,介绍了Microsemi Libero系列教程(一)-Libero开发环境介绍,下载,安装与注册,作为嵌入式开发中的Hello World,点灯是再也基础不过的实验了,通过点灯实验, ...
- .net core 2.1 Nlog.Web.AspNetCore Nlog日志
1.先创建 .net core Web 应用程序,选择API 2.安装 Nuget 包:Nlog.Web.AspNetCore install-package Nlog install-package ...
- 爬虫(二):抓包工具Fiddler
1. 抓包工具Fiddler 1.1 Fiddler下载与安装 最简单的方法,打开百度,搜索fiddler下载. 下载完毕解压即可,此版本为绿色版. 点击这个即可运行抓包软件. 1.2 Fiddler ...
- k8s的yaml说明
理解k8s里的几个概念 Kubernetes 通过各种 Controller 来管理 Pod 的生命周期.为了满足不同业务场景,Kubernetes 开发了 Deployment.ReplicaSet ...
- 打包vue文件,上传到服务器
主要步骤: 1. npm run build生成dist文件夹 2. 将dist文件夹上传到服务器上 3. 服务器上配置nginx,访问路径指向dist文件夹下的index.html,这样当访问ngi ...
- 白话 MVC、MVP、MVVP
白话 MVC.MVP.MVVP 注意这里单纯的通过例子来讲解 MVC MVP MVVP 这三种架构模式的起源和作用,不牵扯某种特定的语言.具体到各种语言各种软件系统上体现有所不同,但是原理都是这样的. ...
- [Go]TCP服务中读写进行协程分离
读写两部分进行一下分离,中间通过chan进行传递数据 ,这样可以方便的在write中进行一些业务处理 single/snet/tcpconn.go package snet import ( &quo ...