当前位置:Gxlcms > 数据库问题 > Centos7 设置oracle11G开机自动启动

Centos7 设置oracle11G开机自动启动

时间:2021-07-01 10:21:17 帮助过:231人阅读

start
su - oracle -c /data/oracle/product/11.2.0/db_1/bin/dbstart

 

3.新建文件

vim /etc/init.d/oracle

 


#!/bin/sh
# chkconfig: 345 61 61
# description: Oracle 11g R2 AutoRun Servimces
# /etc/init.d/oracle
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface
export ORACLE_BASE=/data/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=ORCL
export PATH=$PATH:$ORACLE_HOME/bin
ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# Oracle listener and instance startup
su $ORA_OWNR -lc $ORACLE_HOME/bin/dbstart

 

Centos7 设置oracle11G开机自动启动

标签:key   esc   rac   hat   system   tab   san   $path   eve   

人气教程排行