ORACLE随Linux开机启动

简介:
环境:VM+redhat9+oracle9.2

        1.修改/etc/oratab内容

         ORACLE_SID:/u01/app/oracle/product/10.2.0/db_1:N改为如下内容
        # add below content
        #$ORACLE_SID:$ORACLE_HOME:Y
        demo:/u01/app/oracle/product/9.2.0:Y

        2.修改/etc/rc.local文件加以下内容

         ####################################
        location :/etc/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
        add below content
        su - oracle -c "/bin/sh /home/oracle/dbstart.sh"


        3 new file dbstart.sh vi /home/oracle/dbstart.sh的内容

         export ORACLE_BASE=/u01/app/oracle
        export ORACLE_HOME=/u01/app/oracle/product/9.2.0
        export ORACLE_SID=demo
         start the listener
        /u02/oracle/ora/bin/lsnrctl start
        #start the db
        sqlplus "/as sysdba" <<eof
        startup
        exit
        eof


本文转自茄子_2008博客园博客,原文链接:http://www.cnblogs.com/xd502djj/archive/2011/03/15/1984992.html,如需转载请自行联系原作者。


目录
相关文章
|
3月前
|
负载均衡 Oracle 关系型数据库
Linux启动多个Oracle实例
Linux启动多个Oracle实例
37 0
|
4月前
|
Oracle 关系型数据库 Linux
windows 11 hyper-v中oracle linux虚拟机中添加硬盘
在windows 11自带的hyper-v虚拟机中添加硬盘,并分区
64 6
|
4月前
|
消息中间件 Linux 网络安全
Linux下源码安装RabbitMQ并设置服务开机启动
Linux下源码安装RabbitMQ并设置服务开机启动
78 0
|
5月前
|
应用服务中间件 Linux nginx
Linux开机启动nginx
Linux开机启动nginx
|
7月前
|
消息中间件 Java Linux
rocketmq linux注册服务开机启动配置
rocketmq linux注册服务开机启动配置
252 1
|
14天前
|
Ubuntu Linux
常用Linux开机启动添加方法
常用Linux开机启动添加方法
12 1
|
3月前
|
Linux
linux 开机启动脚本
linux 开机启动脚本
25 1
|
3月前
|
SQL Oracle 关系型数据库
Linux环境下oracle切换用户并查询数据库命令
Linux环境下oracle切换用户并查询数据库命令
|
4月前
|
消息中间件 Kafka Shell
Linux【脚本 02】shell脚本离线安装配置Zookeeper及Kafka并添加service服务和开机启动(脚本分析)
Linux【脚本 02】shell脚本离线安装配置Zookeeper及Kafka并添加service服务和开机启动(脚本分析)
43 0
|
4月前
|
关系型数据库 MySQL Linux
MySQL【部署 02】Linux 非 root 用户部署 mysql-5.7.28 设置开机启动及问题汇总(含云盘资源)
MySQL【部署 02】Linux 非 root 用户部署 mysql-5.7.28 设置开机启动及问题汇总(含云盘资源)
67 0