安装Oracle时出现如下错误
[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-06-07_12-13-22PM. Please wait ...[oracle@localhost database]$ Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
at java.awt.Window.init(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at oracle.ewt.popup.PopupFrame.<init>(Unknown Source)
at oracle.ewt.lwAWT.BufferedFrame.<init>(Unknown Source)
at oracle.sysman.oio.oioc.OiocOneClickInstaller.<init>(OiocOneClickInstaller.java:378)
at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:2091)
执行如下命令得以解决,而不是很多人说的export DISPLAY=localhost:0.0, 不知道为什么这样,有谁知道告诉我,furtherchan@163.com ,非常感谢
[oracle@localhost database]$ export DISPLAY=:0
[oracle@localhost database]$ su
Password:
[root@localhost database]# xhost + localhost
localhost being added to access control list
PS: xhost + hostname /IP : 指定的host就可以让Client端能使用当前服务器的X Server,即用服务器的显示设备做为终端来输出。