用NoMachine安装Oracle出错解决方法

2014-11-24 18:30:17 · 作者: · 浏览: 0

cat .bash_profile的内容:


#############################################


if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=ggsource
PATH=$ORACLE_BASE/gg11:$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_BASE/gg11:$ORACLE_HOME/lib:$LD_LIBRARY_PATH
#DISPLAY=localhost:1018.0
DISPLAY=localhost:0.0
export DISPLAY LD_LIBRARY_PATH ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
stty erase ^h
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
alias ggsci="rlwrap ggsci"


#############################################


使用zc登录到远程机器后,su 到oracle用户。执行runinstaller,出错。如图:



下面我就开始纠结DISPLAY的设置了!


用oracle用户执行 xdpyinfo |grep display 命,想得到DISPALY信息,结果是:


xdpyinfo: unable to open display "localhost:0.0".


再用root用户执行xdpyinfo |grep display,得到的结果一样是:


xdpyinfo: unable to open display "localhost:0.0".


就这样来回折腾了半天。还是无解


就像在文章开头说的那样,由于我是先用zc用户登录,再su到oracle和root用户的,所以老是得到上面的提示。出现这样的原因,不知。


于是在zc用户下执行 xdpyinfo |grep display ,终于出来了


name of display: :1002.0


然后,su - oracle.


在oracle用户下 export DISPLAY=locakhost:1002.0


执行:./runInstaller


搞定!成功安装Oracle了。