linux安装sybase注意事项

来源:互联网 发布:腾讯视频会员淘宝骗局 编辑:程序博客网 时间:2024/05/18 18:00

1.修改环境变量

 修改/home/sybase/.bashrc,加入以下三行:
    LANG=C 
    export LANG

 否则会报错

  Your sybase home directory is /opt/sybase.  Check the environment variable SYBASE  if it is not the one you want! Using locale name "zh_CN.UTF-8" defined in environment variable LANG Cannot access /opt/sybase/locales/message/chinese/common.loc file Cannot access /opt/sybase/locales/message/chinese/cslib.loc file 00:00:00000:00000:2013/12/03 11:06:40.16 kernel  kscsinit: connectivity library   error. Operation: cs_ctx_alloc().

1.linux默认安装路径为 /opt/sybase,只有目录所有者sybase这才能执行startserver(chown -R sybase.sybase /opt/sybase)

   如果一般用户执行,错误信息为 

  Cannot execute file RUN_my_sybaselinux

2.如果安装完sybase后未执行SYBASE.sh,则执行startserver -f  RUN_my_sybaselinux

   报错信息如下

 /opt/sybase/ASE-15_0/bin/dataserver: error while loading shared libraries: libsbgse2.so: cannot open shared object file: No such file or directory 

   解决1:修改/home/sybase/.bash_profile或者/home/sybase/.bashrc ,追加/opt/sybase/SYBASE.sh脚本内容,即环境变量只针对sybase用户,其他用户不能执行showserver,bcp等相关命令

   解决2:copy一份SYBASE.sh到/etc/profile.d/下面,这样相当于对所有用户设置了环境变量

3.设置为自启动
    在/etc/rc.d/rc.local文件加入一行:

  su - sybase -c "/opt/sybase/ASE-15_0/install/startserver -f /opt/sybase/ASE-15_0/install/RUN_ghlinux -f /opt/sybase/ASE-15_0/install/RUN_ghlinux_back &


综上:在执行./setup.bin完成安装后,要完成环境变量的设置和目录归属者的设置才行