linux 7操作系统图形化安装Oracle软件,需要设置DISPLAY环境变量,之前的版本几乎是不需要设置的,如果不设置DISPLAY环境变量,在启动图形界面的时候,很可能会遇到下面的错误。
[root@19cs ~]# xhost +
access control disabled, clients can connect from any host
[root@19cs ~]# su – oracle
[oracle@19cs ~]$ cd $ORACLE_HOME
[oracle@19cs dbhome_1]$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
这时就需要设置DISPLAY环境变量了,但是现在并不清楚DISPLAY的端口,需要用xdpyinfo命令查看DISPLAY的当前端口是什么,默认是0。
[root@19cs ~]# xdpyinfo | head
name of display: :0
version number: 11.0
vendor string: The X.Org Foundation
vendor release number: 11905000
X.Org version: 1.19.5
maximum request size: 16777212 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 7
xdpyinfo的命令输出过多,这里只需要关注第一行也就是name of display后面的值,然后设置DISPLAY环境变量的值为name of display后面的值即可。
[oracle@19cs dbhome_1]$ export DISPLAY=:0
或者像下面这样设置也可以。
[oracle@19cs dbhome_1]$ export DISPLAY=localhost:0.0
然后就可用解决这个问题打开图形界面了。
[oracle@19cs dbhome_1]$ ./runInstaller