免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2416 | 回复: 3
打印 上一主题 下一主题

让Oracle和监听自动启动? [复制链接]

论坛徽章:
1
午马
日期:2013-09-01 15:14:32
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-05-28 20:05 |只看该作者 |倒序浏览
# cat /sbin/init.d/dbora
ORA_HOME=/app/product/817
ORA_OWNER=oracle
case $1 in
'start')

/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/lsnrctl start &
;;
'stop')

/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/lsnrctl stop &
/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
esac

现在能在系统启动后自动运行oracle,但监听启动不了(lsnrctl status查看监听状态时出错),请问应该怎么写?thanx

论坛徽章:
0
2 [报告]
发表于 2003-05-29 22:43 |只看该作者

让Oracle和监听自动启动?

Hi,

Can you try to remove the "&" at the end of each statements? Also, I assume you have linked this script to either /sbin/rc2.d/ or /sbin/rc3.d/, right?

Good luck.

论坛徽章:
0
3 [报告]
发表于 2003-06-01 00:45 |只看该作者

让Oracle和监听自动启动?

Hi,Shad

    Why do you say that "I assume you have linked this script to either /sbin/rc2.d/ or /sbin/rc3.d/"?How do you know that?

论坛徽章:
0
4 [报告]
发表于 2003-06-01 10:21 |只看该作者

让Oracle和监听自动启动?

Hi bill0831,

Directory "/sbin/init.d/" is a repository and it holds almost all the scripts used during system's bootup and shutdown. But when the system boots up or shuts down, it actually executes the scripts whose names begins with "S" or "K" under /sbin/rcX.d/ (here X is 4,3,2, etc.).

If you do a "ls -l /sbin/rc3.d/*", you will see all the Sxxx, Kxxx files are symbolic links to the scripts under /sbin/init.d/ directory.

e.g. if you want a script /sbin/init.d/mytest to be executed during the system bootup at run level 3, you have to link it from /sbin/init.d/ to /sbin/rc3.d/:
# ln -s /sbin/init.d/mytest /sbin/rc3.d/S900mytest

If I did not do the above link, the "mytest" would NOT run when system reboots. I hope this is not the case in lvpk's case.

Hope this explains.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP