- 论坛徽章:
- 0
|
我的操作系统是Red Hat Enterprise Linux 5,我用chkconfig将oracle加入了服务,但是无法以服务启动oracle。
系统提示如下:
[root@localhost ~]# service oracle start
'etc/init.d/oracle: line 11: syntax error near unexpected token `in
'etc/init.d/oracle: line 11: `case "$1" in
[root@localhost ~]#
我的etc/init.d/oracle文件如下:
#!/bin/sh
#
#chkconfig: 2345 99 01
#description: ORACLE 10g Server
ORACLE_HOME=/DBSoftware/app/oracle/product/10.2.0/db_1
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "ORACLE cannot start"
exit
fi
case "$1" in
"start")
echo "Starting Oracle Database..."
su - oracle -c "$ORACLE_HOME/bin/dbstart"
su - oracle -c "$ORACLE_HOME/bin/emctl start dbconsole"
;;
"stop")
echo "Stoping Oracle Database"
su - oracle -c "$ORACLE_HOME/bin/emctl stop dbconsole"
su - oracle -c "$ORACLE_HOME/bin/dbshut"
;;
esac
请高手指点,多谢!!! |
|