Linux下设置Oracle实例和监听自启动Linux认证考试
文章作者 100test 发表时间 2009:11:11 16:18:25
来源 100Test.Com百考试题网
设置 Oracle 实例和监听服务自启动
1. 增加启动脚本
touch /etc/init.d/orcl
vi orcl
# !/bin/bash
# whoami
# root
# chkconfig: 345 51 49
# /etc/init.d/orcl
# description: starts the oracle dabase deamons
#
ORA_HOME=/home/oracle/product/10.2.0/db_1/
ORA_OWNER=oracle
case "$1" in
start)
echo -n "Starting orcl: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" &.
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
touch /var/lock/subsys/orcl
echo
..
stop)
echo -n "shutting down orcl: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut" &.
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
rm -f /var/lock/subsys/orcl
echo
..