root用户登陆
编辑/etc/init.d/oracle文件,输入以下内容(修改自己的ORACLE_BASE)
#!/bin/bash
# For RedHat and cousins:
# chkconfig: 2345 40 40
# description:
# processname:
# For SuSE and cousins
### BEGIN INIT INFO
# Provides: probe
# Required-Start: $syslog $remote_fs
# Should-Start: sendmail
# Required-Stop: $syslog $remote_fs
# Should-Stop: sendmail
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description:
# Description:
# X-UnitedLinux-Default-Enabled: yes
### END INIT INFO
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/oracle
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_USER=oracle
export ORACLE_SID=dbbha
# see how we are called:
case $1 in
start)
su - "$ORACLE_USER"<
编辑回复