请教一下,redhat EL4版下sybase怎么设置开机自起动数据库
<p>我跟据网上下的说明在/etc/rc.d/init.d/目录下加了一个脚本,并且chkconfig sybase on,还是不行.</p><p>脚本如下:</p><p>(3)创建脚本文件sybase:</p><p> #!/bin/sh<br/> #<br/> # sybase: Starts the available Servers<br/> #<br/> # Version: @(#) /etc/rc.d/init.d/sybase 1.2<br/> #<br/> # chkconfig: 345 85 15<br/> #<br/> # description: This script will browse through the <br/> /opt/sybase/install \<br/> # directory and launch all servers configured from this <br/> location.</p><p> # Source function library.<br/> . /etc/rc.d/init.d/functions</p><p> # SYBASE should point to the system administrated server area<br/> #<br/> # Check for the correct SYBASE release area below.<br/> # The queryformat should provide the correct setting on the <br/> installprefix.<br/> # SYBASE=/opt/sybase-12.5<br/> export SYBASE=/opt/sybase</p><p> if [ -n "${SYBASE}" -a -d "${SYBASE}" ]; then</p><p> SYBASE_ASE=`basename $SYBASE/ASE-12_5`<br/> SYBASE_OCS=`basename $SYBASE/OCS-12_5`<br/> <br/> PATH="${SYBASE}/${SYBASE_ASE}/bin{SYBASE}/${SYBASE_OCS}{SYBASE}/${SYBASE_ASE}/install{PATH}"<br/> export SYBASE SYBASE_ASE SYBASE_OCS PATH</p><p> # See how we were called.<br/> case "$1" in<br/> start)<br/> echo -n "Starting Sybase ASE ... "<br/> ( cd ${SYBASE}/${SYBASE_ASE}/install ; \<br/> unset LANG ; unset LC_ALL ; \</p><p> for run_server in RUN_* ; do \<br/> su -c "startserver -f ${run_server}" sybase > <br/> /dev/null 2>&1 ; \<br/> echo -n "${run_server} " ; \<br/> done )<br/> echo</p><p> touch /var/lock/subsys/sybase<br/> ;;</p><p> stop)<br/> echo -n "Shuting down Sybase ASE configured servers: "<br/> killproc dataserver<br/> killproc backupserver<br/> killproc monserver</p><p> # Add your own openserver applications.<br/> echo<br/> ;;</p><p> status)<br/> showserver<br/> ;;</p><p> restart)<br/> $0 stop<br/> $0 start<br/> ;;<br/> *)<br/> echo "*** Usage: sybase {start|stop|status|restart}"<br/> exit 1<br/> esac</p><p> fi</p><p> exit 0</p><p> 把sybase拷贝到/etc/init.d下,chkconfig sybase on,</p><p>不知道是不是脚本问题.</p><p>哪位高手能不能,指导一下?</p> <p class="MsoNormal" style="MARGIN: 6pt 0cm 6pt 15.75pt; LINE-HEIGHT: 18pt; mso-para-margin-top: 6.0pt; mso-para-margin-right: 0cm; mso-para-margin-bottom: 6.0pt; mso-para-margin-left: 1.5gd;"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><font face="Times New Roman">假如是装在opt下面的话</font></span></p><p class="MsoNormal" style="MARGIN: 6pt 0cm 6pt 15.75pt; LINE-HEIGHT: 18pt; mso-para-margin-top: 6.0pt; mso-para-margin-right: 0cm; mso-para-margin-bottom: 6.0pt; mso-para-margin-left: 1.5gd;"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><font face="Times New Roman"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: "Times New Roman"; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;">在/etc/rc.d/rc.local后面追加</span></font></span></p><p class="MsoNormal" style="MARGIN: 6pt 0cm 6pt 15.75pt; LINE-HEIGHT: 18pt; mso-para-margin-top: 6.0pt; mso-para-margin-right: 0cm; mso-para-margin-bottom: 6.0pt; mso-para-margin-left: 1.5gd;"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><font face="Times New Roman"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: "Times New Roman"; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;"></span></font></span></p><p class="MsoNormal" style="MARGIN: 6pt 0cm 6pt 15.75pt; LINE-HEIGHT: 18pt; mso-para-margin-top: 6.0pt; mso-para-margin-right: 0cm; mso-para-margin-bottom: 6.0pt; mso-para-margin-left: 1.5gd;"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><font face="Times New Roman"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: "Times New Roman"; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: "Times New Roman"; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;">. /opt/sybase/SYBASE.sh</span></span></font></span></p><p class="MsoNormal" style="MARGIN: 6pt 0cm 6pt 15.75pt; LINE-HEIGHT: 18pt; mso-para-margin-top: 6.0pt; mso-para-margin-right: 0cm; mso-para-margin-bottom: 6.0pt; mso-para-margin-left: 1.5gd;"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><font face="Times New Roman">/opt/sybase/ASE-15_0/install/startserver –f /opt/sybase/ASE-15_0/install/RUN_</font></span><span style="BACKGROUND: #d9d9d9; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-shading: white; mso-pattern: gray-15 auto;">服务器</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><p></p></span></p><p class="MsoNormal" style="MARGIN: 6pt 0cm 6pt 15.75pt; LINE-HEIGHT: 18pt; mso-para-margin-top: 6.0pt; mso-para-margin-right: 0cm; mso-para-margin-bottom: 6.0pt; mso-para-margin-left: 1.5gd;"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><font face="Times New Roman">/opt/sybase/ASE-15_0/install/startserver –f /opt/sybase/ASE-15_0/install/RUN_</font></span><span style="BACKGROUND: #d9d9d9; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-shading: white; mso-pattern: gray-15 auto;">服务器</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt;"><font face="Times New Roman">_BS<p></p></font></span></p> <p></p><p>先谢谢楼上,</p><p>我去试试</p><p></p> ase.sybaseclub.org 上有一个LINUX下自动启动的脚本,请自行参考<br/>
页:
[1]