学习自:

http://blog.csdn.net/condywl/article/details/57129696

1. 在root用户下进行修改 配置文件 /etc/oratab

vim /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.
#
#
orcl:/u01/app/oracle/product/18.1./dbhome_1:Y

根据信息 增加后者是修改的一行信息为:

orcl:/u01/app/oracle/product/18.1./dbhome_1:Y

2. 切换到oracle用户,并且进入到oracle的home路径下

su - oracle
cd $ORACLE_HOME/bin

3. 编辑oracle home目录下的dbstart 以及 dbshut的文件

主要修改点:

将多个 $1 修改为 $ORACLE_HOME

以及将 ORACLEBASEHOME_EXEC修改为如下.

ORABASEHOME_EXEC=$ORACLE_HOME/bin

在bin目录下执行操作测试

./dbshut 以及 ./dbstart 验证 能够正常开启或者关闭数据库

验证lsnrctl 下status以及 oracle  sqlplus / as sysdba 下面都可用

4. 修改开机启动脚本.

切换到root用户

su - root 

vim /etc/rc.d/rc.local
#这里需要给rc.local增加可执行权限
chmod +x /etc/rc.d/rc.local
systemd 之后 linux 应该已经不主要支持rc.local下面的启动方式了.

在文档的最后增加一行

su - oracle -lc dbstart

5. reboot linux 验证 oracle可以自动启动起来.

oracle 18c centos7 设置开机自动启动Oracle的更多相关文章

  1. CentOS 7.6 RPM 方式安装Oracle19c 后 使用 systemd 的方式设置开机自动启动Oracle数据库

    1. 方法简介: 使用systemd 来进行 oracle数据库的启动和关闭操作. 使用的脚本为 lsnrctl和dbstart 2. 修改事项. 需要先修改一下 oracle 的启动脚本配置: vi ...

  2. 在RHEL5.4下设置开机自动启动ORACLE 11G

    以root身份登录,创建启动服务脚本 #cd /etc/rc.d/init.d #touch oracle11g #chmod a+x oracle11g 编辑启动脚本脚本文件(oracle11g), ...

  3. CentOS设置开机自动启动某服务

    CentOS设置开机自动启动某服务   这里以启动sshd服务为例:   查看sshd是否已经是系统服务:   # chkconfig --list |grep sshd 会显示:  sshd     ...

  4. centos下安装memcached并设置开机自动启动-两种方法

    方法一: 安装memcachedyum install memcached 启动服务并初始化service memcached start -p 11211 -l 127.0.0.1 -d 设置mem ...

  5. Mongodb 启动关闭脚本并设置开机自动启动Mongodb

    配置文件内容:[root@yoon etc]# cat mongod.conf logpath=/export/log/mongodb.loglogappend=truefork = truedbpa ...

  6. VMware ESXi 6.7服务器设置开机自动启动虚拟机

    VMware ESXi 6.7服务器设置开机自动启动虚拟机,具体操作步骤如下 1.登陆到VMware ESXi 6.7  web 界面 2.导航器-->主机-->管理  将自动启动修改为 ...

  7. Linux开机自动启动ORACLE设置

    1.安装好Oracle数据库后: 执行 dbstart和dbshut会提示: [oracle@oracle11g ~]$ dbstartORACLE_HOME_LISTNER is not SET, ...

  8. linux 系统下开机自动启动oracle 监听和实例 (亲测有效)

    [oracle@oracle11g ~]$ dbstartORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listene ...

  9. Centos7下源编译安装Postgresql 并设置开机自动启动postgresql.serivce 服务相关研究

    编写开机自动启动服务脚本: # cat >> /usr/lib/systemd/system/postgresql.service >> EOF [Unit] Descript ...

随机推荐

  1. The Cat in the Hat POJ - 1289

    题意:给你来两个数A,B  .其中A=(n+1)k, B=nk    输出:(nk-1)/(n-1) 和  ∏ (n+1)k-i ni 思路:关键就是怎么求n和k.本来想这n一定是几个质因数的乘积,那 ...

  2. django -- 推荐商品算法

    协同过滤算法之基于物品的推荐算法 目前有关个性化推荐算法主要分为三大类:1.基于协同过滤的推荐:2.基于内容过滤的推荐和3.社会化推荐. 本文主要讨论基于协同过滤的推荐,而该算法也可以划分为两类: 1 ...

  3. Spring Security 中的过滤器

    本文基于 spring-security-core-5.1.1 和 tomcat-embed-core-9.0.12. Spring Security 的本质是一个过滤器链(filter chain) ...

  4. VUE2 第五天学习--过渡效果

    阅读目录 1.理解VUE---过渡效果 回到顶部 1.理解VUE---过渡效果 1. 过渡的-css-类名会有4个(css) 类名在 enter/leave 在过渡中切换.1. v-enter: 进入 ...

  5. Vue2---父子组件之间的访问

    个人小总结:1年多没有写博客,感觉很多知识点生疏了,虽然工作上能解决问题,但是当别人问到某个知识点的时候,还是迷迷糊糊的,所以坚持写博客是硬道理的,因为大脑不可能把所有的知识点记住,有可能某一天忘了, ...

  6. centos7环境搭建

    1. tar命令安装 yum install -y tar 2. jdk8下载 wget --no-check-certificate --no-cookies --header "Cook ...

  7. scrapy实验1 爬取中国人寿官网新闻,保存为xml

    一.scrapy 实验  爬中国人寿新闻,保存为xml 如需转发,请注明出处:小婷儿的python  https://www.cnblogs.com/xxtalhr/p/10517297.html 链 ...

  8. React-使用combineReducers完成对数据对拆分管理

    数据都放在reducer.js下不利于对数据进行管理,可以把一个大的reducer.js拆分成多个小的reducer.js. 小的reducer.js const defaultState={ foc ...

  9. STM32 M3内核的位带操作原理及步骤

    STM32 M3内核的位带操作原理及步骤 一.位带操作有什么用?什么是位带操作 位带操作的作用:可以实现对某一GPIO口寄存器(或SRAM内存中)的某一bit位直接写0或1,达到控制GPIO口输出(或 ...

  10. 【JVM.4】调优案例分析与实战

    之前已经介绍过处理Java虚拟机内存问题的知识与工具,在处理实际项目的问题时,除了知识与工具外,经验同样是一个很重要的因素.本章会介绍一些具有代表性的案例. 本章的内容推荐还是原文全篇看完的好,实在不 ...