请教小布老师一下,我在按照你您提供的linux下安装oracle11g教程逐步进行的,安装前的配置已经完成,但在安装时提示一个错误:
[oracle@cfylinux database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB. Actual 8031 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,at which time they will be rechecked.
Continue? (y/n) [n] y
Rechecking installer requirements....
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-05-23_09-21-26AM. Please wait ...[oracle@cfylinux database]$ Xlib: connection to
"cfylinux:0.0" refused by server
Xlib: No protocol specified
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'cfylinux:0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at java.awt.Window.init(Window.java:270)
at java.awt.Window.<init>(Window.java:318)
at java.awt.Frame.<init>(Frame.java:419)
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:328)
at oracle.sysman.oio.oioc.OiocOneClickInstaller.<clinit>(OiocOneClickInstaller.java:168)
[oracle@cfylinux database]$
我于是参照oralce11g安装说明文档(88页):
11.If you are not installing the software on the local system, then enter a command similar to the following to direct X applications to display on the local
system:
Bourne, Bash, or Korn shell:
$ DISPLAY=local_host:0.0 ; export DISPLAY
C shell:
% setenv DISPLAY local_host:0.0
In this example, local_host is the host name or IP address of the system that you want to use to display Oracle Universal Installer (your workstation or PC).
添加了 DISPLAY 环境变量,然后查看 env 如下:
HOSTNAME=cfylinux
SHELL=/bin/bash
TERM=xterm
HISTSIZE=1000
USER=oracle
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=0
0;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:
ORACLE_SID=cfydb
ORACLE_BASE=/ora_11
MAIL=/var/spool/mail/oracle
PATH=/ora_11/oracle11g/bin:/usr/X11R6/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/ora_11/oracle11g/bin
INPUTRC=/etc/inputrc
PWD=/ora_11/oracle11g
LANG=en_US.UTF-8
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=1
HOME=/ora_11/oracle11g
LOGNAME=oracle
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=cfylinux:0.0
ORACLE_HOME=/ora_11/oracle11g
G_BROKEN_FILENAMES=1
_=/bin/env
但是再次安装时仍然提示上述错误,请教老师一下,该如何解决,谢谢。
非常感谢两位老师的回复,经过几番试验,终于找到原因:
正确的登录方式:在字符界面,使用 oracle 用户通过 start x登录 Xwindow,即可进行安装。或者以图形界面启动系统,再使用 oracle 用户登陆,即可进行安装。
失败的登陆方式:以root用户登录Xwindow,然后su - oralce,这样在进行安装时,就会提示上述那些错误了。
总结:但我当时第一次试着在字符界面通过 oracle 用户 startx 时,提示错误信息,无法进入图形界面。然后我把 /ect/inittab 改成图形方式启动时,以 oracle 用户登录,可以进入。然后在次将 /ect/inittab 改成字符界面启动,reboot 之后,通过 oracle 用户登陆系统,然后 startx ,这次竟然没有提示错误信息,直接进入图形界面了,不知是什么原因,在小布老师的视频中没出现过这种情况啊,难道必须使用新建的用户先登陆一次图形界面,才能在字符界面启动 startx 吗?不知大家是否遇见过类似情况,期待讨论。
在这里还想请教一个小问题,就是在系统启动时,先要启动一些服务,但是有两个服务的启动时间特别慢,不知是否正常,还是没有配置正确造成的:
Starting sendmail [ok] 耗时3-4分钟
Starting sm-client [ok] 耗时1分钟
再次感谢两位老师的帮助。