当前位置: 技术问答>linux和unix
在linux下安装sybase,设置的环境变量没有生效.求大虾解答
来源: 互联网 发布时间:2016-08-10
本文导语: 安装完sybase后 执行source SYBASE.cshrc 用env命令查看没有问题,但重起之后再用env查看结果为 [sybase@tsg1 ~]$ env SUPPORTED=zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en SSH_AGENT_PID=21471 HOSTNAME=tsg1 HOST=tsg1 SHELL=/bin/csh TERM=xterm QTDIR=/usr/lib/qt-3....
安装完sybase后 执行source SYBASE.cshrc
用env命令查看没有问题,但重起之后再用env查看结果为
[sybase@tsg1 ~]$ env
SUPPORTED=zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en
SSH_AGENT_PID=21471
HOSTNAME=tsg1
HOST=tsg1
SHELL=/bin/csh
TERM=xterm
QTDIR=/usr/lib/qt-3.3
GROUP=sybase
USER=sybase
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
HOSTTYPE=i386-linux
SSH_AUTH_SOCK=/tmp/ssh-OkJen21470/agent.21470
KDEDIR=/usr
USERNAME=sybase
MAIL=/var/spool/mail/sybase
DESKTOP_SESSION=default
PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
INPUTRC=/etc/inputrc
PWD=/sdb/sybase
LANG=en_US.UTF-8
GDM_LANG=en_US.UTF-8
GDMSESSION=default
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HOME=/sdb/sybase
SHLVL=2
OSTYPE=linux
VENDOR=intel
MACHTYPE=i386
LOGNAME=sybase
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-XBIy6Qhqgq
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=:0.0
G_BROKEN_FILENAMES=1
XAUTHORITY=/sdb/sybase/.Xauthority
GTK_RC_FILES=/etc/gtk/gtkrc:/sdb/sybase/.gtkrc-1.2-gnome2
SESSION_MANAGER=local/tsg1:/tmp/.ICE-unix/21488
GNOME_KEYRING_SOCKET=/tmp/keyring-0uL500/socket
GNOME_DESKTOP_SESSION_ID=Default
COLORTERM=gnome-terminal
WINDOWID=37748817
另副sybase.cshrc文件内容
#!/bin/csh
setenv SYBASE_ASE ASE-12_5
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/ASE-12_5/bin:/sdb/sybase/ASE-12_5/install:$PATH
if ( $?LD_LIBRARY_PATH == "0" ) then
setenv LD_LIBRARY_PATH ""
endif
setenv LD_LIBRARY_PATH /sdb/sybase/ASE-12_5/lib:$LD_LIBRARY_PATH
setenv SYBASE_JRE /sdb/sybase/shared-1_0/JRE-1_3
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/JS-12_5/bin:$PATH
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/RPL-12_5/bin:$PATH
if ( $?LD_LIBRARY_PATH == "0" ) then
setenv LD_LIBRARY_PATH ""
endif
setenv LD_LIBRARY_PATH /sdb/sybase/SQLRemote/lib:$LD_LIBRARY_PATH
setenv SYBASE /sdb/sybase
setenv SYBASE_OCS OCS-12_5
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/OCS-12_5/bin:$PATH
if ( $?LD_LIBRARY_PATH == "0" ) then
setenv LD_LIBRARY_PATH ""
endif
setenv LD_LIBRARY_PATH /sdb/sybase/OCS-12_5/lib:/sdb/sybase/OCS-12_5/lib3p:$LD_LIBRARY_PATH
setenv SYBASE_SYSAM SYSAM-1_0
setenv LM_LICENSE_FILE /sdb/sybase/SYSAM-1_0/licenses/license.dat
用env命令查看没有问题,但重起之后再用env查看结果为
[sybase@tsg1 ~]$ env
SUPPORTED=zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en
SSH_AGENT_PID=21471
HOSTNAME=tsg1
HOST=tsg1
SHELL=/bin/csh
TERM=xterm
QTDIR=/usr/lib/qt-3.3
GROUP=sybase
USER=sybase
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
HOSTTYPE=i386-linux
SSH_AUTH_SOCK=/tmp/ssh-OkJen21470/agent.21470
KDEDIR=/usr
USERNAME=sybase
MAIL=/var/spool/mail/sybase
DESKTOP_SESSION=default
PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
INPUTRC=/etc/inputrc
PWD=/sdb/sybase
LANG=en_US.UTF-8
GDM_LANG=en_US.UTF-8
GDMSESSION=default
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HOME=/sdb/sybase
SHLVL=2
OSTYPE=linux
VENDOR=intel
MACHTYPE=i386
LOGNAME=sybase
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-XBIy6Qhqgq
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=:0.0
G_BROKEN_FILENAMES=1
XAUTHORITY=/sdb/sybase/.Xauthority
GTK_RC_FILES=/etc/gtk/gtkrc:/sdb/sybase/.gtkrc-1.2-gnome2
SESSION_MANAGER=local/tsg1:/tmp/.ICE-unix/21488
GNOME_KEYRING_SOCKET=/tmp/keyring-0uL500/socket
GNOME_DESKTOP_SESSION_ID=Default
COLORTERM=gnome-terminal
WINDOWID=37748817
另副sybase.cshrc文件内容
#!/bin/csh
setenv SYBASE_ASE ASE-12_5
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/ASE-12_5/bin:/sdb/sybase/ASE-12_5/install:$PATH
if ( $?LD_LIBRARY_PATH == "0" ) then
setenv LD_LIBRARY_PATH ""
endif
setenv LD_LIBRARY_PATH /sdb/sybase/ASE-12_5/lib:$LD_LIBRARY_PATH
setenv SYBASE_JRE /sdb/sybase/shared-1_0/JRE-1_3
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/JS-12_5/bin:$PATH
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/RPL-12_5/bin:$PATH
if ( $?LD_LIBRARY_PATH == "0" ) then
setenv LD_LIBRARY_PATH ""
endif
setenv LD_LIBRARY_PATH /sdb/sybase/SQLRemote/lib:$LD_LIBRARY_PATH
setenv SYBASE /sdb/sybase
setenv SYBASE_OCS OCS-12_5
if ( $?PATH == "0" ) then
setenv PATH ""
endif
setenv PATH /sdb/sybase/OCS-12_5/bin:$PATH
if ( $?LD_LIBRARY_PATH == "0" ) then
setenv LD_LIBRARY_PATH ""
endif
setenv LD_LIBRARY_PATH /sdb/sybase/OCS-12_5/lib:/sdb/sybase/OCS-12_5/lib3p:$LD_LIBRARY_PATH
setenv SYBASE_SYSAM SYSAM-1_0
setenv LM_LICENSE_FILE /sdb/sybase/SYSAM-1_0/licenses/license.dat
|
把SYBASE.cshrc 拷贝到/etc/profile.d/目录下去