学习自:

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. 小度之家SDK功能介绍

    https://developer.dueros.baidu.com/doc/device-devkit/intro_markdown

  2. Linux_修改hosts

    文章转自 https://blog.csdn.net/mikyz/article/details/69399987 Windows用户XP的在C盘 C:WINDOWS/system32/drivers ...

  3. Unicode(UTF-8, UTF-16)令人混淆的概念(转)

    文章转自http://www.cnblogs.com/kingcat/archive/2012/10/16/2726334.html (http://swiftlet.net/archives/cat ...

  4. yum问题解决

    错误信息1:There was a problem importing one of the Python modulesrequired to run yum. The error leading ...

  5. 包含 PHP和nginx的镜像 supervisord.conf Dockerfile 案例

    参考:https://github.com/romeOz/docker-nginx-php 1.命令: docker run --name app -d -p 8080:80 \ --net pg_n ...

  6. SkylineGlobe6.5遍历信息树节点方法

    //------------------- //searchGeometries function searchGeometries2(parentNode, callbackFunc) { SGWo ...

  7. Django 学习第三式

    1.Django请求生命周期 两种情况:最终返回的是字符串 1.-> URL对应关系(匹配) -> 视图函数 -> 返回用户字符串 2.-> URL对应关系(匹配) -> ...

  8. odoo之页面跳转

    击备注时,会由备注id带出他的内容 customer.requirement这是备注内容表 def sale_requirements_change(self, cr, uid, ids, requi ...

  9. CF1060E Sergey and Subways 假的点分治

    题目传送门:http://codeforces.com/problemset/problem/1060/D 题意:给出$N$个点的一棵树,现在将距离为$2$的点之间连一条边,求所有点对之间最短路的和, ...

  10. linux shell的here document用法

    转载自: http://my.oschina.net/u/1032146/blog/146941 什么是Here Document?Here Document 是在Linux Shell 中的一种特殊 ...