交友约会| 杂志期刊| 小说| 论坛| 电影下载| 两性知识| 电脑知识| 汽车| 旅游| 收藏

设置Linux的服务自动启动Oracle服务器

来源: 作者: 出处:综艺读书 2007-06-27 进入讨论组
关 键 词:word  
       Linux中在Oracle安装完毕以后,如果重新启动Linux ,Oracle是不会自动启动的,你可以通过手动调用dbstart命令来进行启动,不过这样似乎也很繁琐。我们可以通过配置Oracle的自动启动脚本,然后利用Linux的Service来启动Oracle服务器。

        首先在/etc/rc.d/init.d/目录下配置Oracle的服务文件。


设置Linux的服务自动启动Oracle服务器touch oracle10g
设置Linux的服务自动启动Oracle服务器chmod a+x oracle10g
设置Linux的服务自动启动Oracle服务器

        然后编辑此oracle10g文件。内容如下。

设置Linux的服务自动启动Oracle服务器# !/bin/bash
设置Linux的服务自动启动Oracle服务器# whoami
设置Linux的服务自动启动Oracle服务器# root
设置Linux的服务自动启动Oracle服务器# chkconfig: 345 51 49
设置Linux的服务自动启动Oracle服务器# description: starts the oracle dabase deamons
设置Linux的服务自动启动Oracle服务器#
设置Linux的服务自动启动Oracle服务器ORA_HOME=/opt/oracle
设置Linux的服务自动启动Oracle服务器ORA_OWNER=oracle
设置Linux的服务自动启动Oracle服务器case "$1" in
设置Linux的服务自动启动Oracle服务器'start')
设置Linux的服务自动启动Oracle服务器echo -n "Starting oracle10g: "
设置Linux的服务自动启动Oracle服务器su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" &
设置Linux的服务自动启动Oracle服务器su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
设置Linux的服务自动启动Oracle服务器touch /var/lock/subsys/oracle10g
设置Linux的服务自动启动Oracle服务器echo
设置Linux的服务自动启动Oracle服务器;;
设置Linux的服务自动启动Oracle服务器
设置Linux的服务自动启动Oracle服务器'stop')
设置Linux的服务自动启动Oracle服务器echo -n "shutting down oracle10g: "
设置Linux的服务自动启动Oracle服务器su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut" &
设置Linux的服务自动启动Oracle服务器su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
设置Linux的服务自动启动Oracle服务器rm -f /var/lock/subsys/oracle10g
设置Linux的服务自动启动Oracle服务器echo
设置Linux的服务自动启动Oracle服务器;;
设置Linux的服务自动启动Oracle服务器
设置Linux的服务自动启动Oracle服务器'restart')
设置Linux的服务自动启动Oracle服务器echo -n "restarting oracle10g: "
设置Linux的服务自动启动Oracle服务器$0 stop
设置Linux的服务自动启动Oracle服务器$0 start
设置Linux的服务自动启动Oracle服务器echo
设置Linux的服务自动启动Oracle服务器;;
设置Linux的服务自动启动Oracle服务器*)
设置Linux的服务自动启动Oracle服务器echo "usage: oracle10g { start | stop | restart }"
设置Linux的服务自动启动Oracle服务器exit 1
设置Linux的服务自动启动Oracle服务器
设置Linux的服务自动启动Oracle服务器esac
设置Linux的服务自动启动Oracle服务器exit 0

        保存文件,退出以后,添加并启动察看服务。

设置Linux的服务自动启动Oracle服务器/sbin/chkconfig --add oracle10g
设置Linux的服务自动启动Oracle服务器/sbin/chkconfig --list oracle10g

        重新启动Linux的时候,如果看到启动项Oracle出现OK,代表Oracle成功随Linux启动了。

更多文章 更多内容请看FTP服务器  IIS服务器应用技巧  IMail服务器专题,或进入讨论组讨论。
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
综艺读书宗旨
相关专题
·FTP服务器 (5017篇文章)
·双核服务器技术 (5589篇文章)
·网站服务器的选型 (6537篇文章)
·网吧流媒体服务器 (5263篇文章)
·刀片服务器专题 (4594篇文章)
·服务器配置专栏 (8912篇文章)
·IIS服务器应用技巧 (5071篇文章)
·Linux集群技术 (7084篇文章)
·打造安全服务器 (11022篇文章)
·服务器行业应用 (4577篇文章)
热点标签: word  
阅读排行榜
最新技术文档
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
百度推荐,商机无限
搜索您感兴趣的内容
Web 全站
综艺电脑频道编辑信箱  告诉我们您想看的专题或文章

友情互链 | 收藏本站 | 联系我们 | 在线留言 | 京ICP备08008424号|