免费注册 查看新帖 |

Chinaunix

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

[安装配置] 请高手把关 有关自动启动Sybase的设置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-11-18 11:41 |只看该作者 |倒序浏览
在AIX的inittab文件末尾加上下面的三句能否正常自动启动Sybase?“sybase:2:wait”里面的“2”代表什么呀?语句末尾的“/dev/console 2>;&1”是什么意思?谢谢
sleep 90
sybase:2:wait:/sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_0/install/RUN_DRPDB /dev/console 2>;&1
sybase:2:wait:/sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_0/install/RUN_DRPDB_BACKUP /dev/console 2>;&1

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2004-11-18 12:00 |只看该作者

请高手把关 有关自动启动Sybase的设置

2是一个级别,因为你的init执行的级别是2,所以你后面的只有级别是2的语句才会执行。

论坛徽章:
0
3 [报告]
发表于 2004-11-18 12:21 |只看该作者

请高手把关 有关自动启动Sybase的设置

谢谢指教,PS:这样写没有问题吧?能实现自动启动么?

论坛徽章:
0
4 [报告]
发表于 2004-11-18 13:19 |只看该作者

请高手把关 有关自动启动Sybase的设置

好像有问题,
sleep 90这样写是不行的,
而且/dev/console前应加>;号
如果sybase对环境变量有要求的话,也会不成功。
>;/dev/console 2>;&1 是出错信息和输出信息都送到console上
最好是写成shell文件,放在/etc/rc.local里执行(以下适当变通)
rclocal:23456789:wait:/etc/rc.local >; /dev/console 2>;&1 # Start local commands

/etc/rc.lcoal内容
  su - sybase -c  /home/script/startsybase.sh

/home/script/startsybase.sh的内容
sleep 90
sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_0/install/RUN_DRPDB >;/dev/console  
/sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_0/install/RUN_DRPDB_BACKUP >;/dev/console

论坛徽章:
0
5 [报告]
发表于 2004-11-18 14:56 |只看该作者

请高手把关 有关自动启动Sybase的设置

奇怪,Sybase的文档上没有>;号,为什么sleep 90 不能执行呢?

论坛徽章:
0
6 [报告]
发表于 2004-11-18 15:31 |只看该作者

请高手把关 有关自动启动Sybase的设置

man initab
The /etc/inittab file is composed of entries that are position-dependent and
have the following format:

Identifier:RunLevel:Action:Command

论坛徽章:
0
7 [报告]
发表于 2004-11-18 15:48 |只看该作者

请高手把关 有关自动启动Sybase的设置

Starting Servers When the Operating System Restarts
This section describes how to configure your operating system for automatic restart of Adaptive Server and Backup Server.

On production syst ems, Adaptive Server, Backup Server, and Monitor Server should restart automatically when the UNIX operating system starts. This is accomplished by making an entry for the server in the operating system start-up script.

Monitor Server must be listed after Adaptive Server in the start-up script. For more information on starting Monitor Server at operating system restart, see the Sybase Adaptive Server Enterprise Monitor Server User's Guide.

On production systems, Adaptive Server can be restarted automatically whenever the UNIX operating system restarts. To have Adaptive Server restart automatically, place the startserver command in the /etc/inittab file.

Following is a suggested format for an Adaptive Server start-up command to add to /etc/inittab:

"sybase:2:wait:/release_directory/install/startserver  -f \ RUN_servername /dev/console  2>;&1"

Where release_directory is the full path to the Sybase installation directory (specified as the SYBASE environment variable), and RUN_servername is the runserver file for the server you are starting.

Make sure that the entry for starting Adaptive Server follows any entry for /etc/rc.tcpip and /etc/rc.nfs in the /etc/inittab file. All network resources must be available before you start Adaptive Server; otherwise Adaptive Server will not start. Also, your server will not start if the network is not up.

Slow start-up of network operations can also prevent Adaptive Server from starting, even when the commands in the /etc/rc.tcpip file are in the correct order. You can designate a period of time for Adaptive Server to wait before starting by inserting a sleep command before the server start-up command in the runserver file. The sleep command is in the form:

sleep seconds_of_rest

To enable restart of a Backup Server at the operating system restart, add a Backup Server start-up command to /etc/inittab. Use the path of the Backup Server runserver file in this command.

这是我看到的文档,有两点
1。我觉得aix下应该是要加>;号的,除非startserver有这样的参数
2。sleep是加在runserver file里的。

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
8 [报告]
发表于 2004-11-18 16:04 |只看该作者

请高手把关 有关自动启动Sybase的设置

最好是编辑脚步,在inittab中执行该教本。
这样可以先调试脚步,成功后在启动时执行

论坛徽章:
0
9 [报告]
发表于 2004-11-18 17:38 |只看该作者

请高手把关 有关自动启动Sybase的设置

谢谢二位的帮忙,万分感谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP