Can't connect to X11 window server using '127.0.0.1:0.0'

本文介绍了在Linux AS5.3 64位环境下为Oracle 10.2.0.4配置.bash_profile的方法,并解决了在VNC登录或从root用户切换到oracle用户时出现的Java错误问题。

Oracle 10.2.0.4  ,  Linux AS 5.3 ,  64BIT

oracle 用戶的  .bash_profile  ,

-------------------------------------------------------------------------------------------------------------------------  

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
BASH_ENV=$HOME/.BASHRC

export BASH_ENV PATH
unset USERNAME

# Set Oracle Environment
ORACLE_HOME=/u01/product/oracle;export ORACLE_HOME
ORACLE_SID=wmb2bprd1; export ORACLE_SID
ORACLE_OWNER=oracle;export ORACLE_OWNER
ORACLE_BASE=/u01/product;export ORACLE_BASE
ORACLE_TERM=vt100;export ORACLE_TERM
#NLS_LANG='traditional chinese_taiwan'.ZHT16BIG5;export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH

ORA_CRS_HOME=/u01/product/crs; export ORA_CRS_HOME

set -u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
JAVA_HOME=/usr/local/java;export JAVA_HOME
ORA_NLS33=/u01/product/oracle/ocommon/nls/admin/data;export ORA_NLS33
CLASSPATH=/u01/product/oracle/jdbc/lib/classesl11.zip:/usr/local/java;
export DISPLAY=127.0.0.1:0.0
# export LD_ASSUME_KERNEL=2.6.9
export LD_ASSUME_KERNEL=2.6.18
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORA_CRS_HOME/bin:$JAVA_HOME/bin:$PATH:.;export PATH
alias ll='ls -l';
alias ls='ls --color';
alias his='history';

umask 022

 

 


-------------------------------------------------------------------------------------------------------------------------------- 

安裝Oracle軟件或升級的時候, 會出現java的錯誤, 主要是我们VNC登入xwinow的时候是以root 登入或我们linux  terninal  是从root 用户切换到oracle用户来操作的 , 所以会报错, 我们需要VNC 登入也是oracle , 开启linux terminal 直接就是oracle用户,  而不是root 切换的 。 

 

mxb2bcoredb01$./runInstaller

Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1, asianux-2 or asianux-3

                                      Passed

All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-02-25_01-41-45PM. Please wait ...mxb2bcoredb01$Oracle Universal Installer, Version 10.2.0.4.0 Production

Copyright (C) 1999, 2008, Oracle. All rights reserved.

Can't connect to X11 window server using '127.0.0.1:0.0' as the value of the DISPLAY variable.

127.0.0.1:0.0

127.0.0.1:0.0

OUI-10025:Unable to start an interactive install session because of the following error:Can't connect to X11 window server using '127.0.0.1:0.0' as the value of the DISPLAY variable. The DISPLAY environment variable should be set to :, where the is usually '0.0'.

OUI-10026:Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:

- For csh:                      % setenv DISPLAY 192.168.1.128:0.0

- For sh, ksh and bash:         $ DISPLAY=192.168.1.128:0.0; export DISPLAY

Use the following command to see what shell is being used:

        echo $SHELL

Use the following command to view the current DISPLAY environment variable setting:

        echo $DISPLAY

- Make sure that client users are authorized to connect to the X Server.

OUI-10027:To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:

% xhost +

To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':

        %

If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.

Typical path for 'xclock': '/usr/X11R6/bin/xclock'  

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-627888/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-627888/

Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.bes.enterprise.webserver.console.bootstrap.db.DBToolMain.openui(DBToolMain.java:304) at com.bes.enterprise.webserver.console.bootstrap.db.DBToolMain.main(DBToolMain.java:66) Caused by: java.awt.AWTError: Can't connect to X11 window server using '127.0.0.1:0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at java.awt.Window.initGC(Window.java:475) at java.awt.Window.init(Window.java:495) at java.awt.Window.<init>(Window.java:537) at java.awt.Frame.<init>(Frame.java:420) at java.awt.Frame.<init>(Frame.java:385) at javax.swing.JFrame.<init>(JFrame.java:189) at org.hsqldb.util.DatabaseManagerSwing.<init>(Unknown Source) at org.hsqldb.util.DatabaseManagerSwing.main(Unknown Source) 这个报错是什么含义
最新发布
12-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值