解决Linux下安装oracle提示DISPLAY not set. Please set the DISPLAY and try again.方法

  • Post author:
  • Post category:linux


解决Linux下安装oracle提示DISPLAY not set. Please set the DISPLAY and try again.方法



0.解决流程

解决流程



1.问题描述

linux下安装oracle时遇到如下错误提示:DISPLAY not set. Please set the DISPLAY and try again.,详见如下:

[oracle@localhost database]$ ./runInstaller 
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 7711 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/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] y


>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-07-19_10-08-27AM. Please wait ...
DISPLAY not set. Please set the DISPLAY and try again.
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.
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':
	% <full path to xclock.. see below>
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
[oracle@localhost database]$ 



2.解决办法

#切换root用户
[oracle@localhost database]$ su root
密码:
#编辑/etc/profile文件,添加内容:export DISPLAY=:0.0
[root@localhost database]# vi /etc/profile
[root@localhost database]# cat /etc/profile
#省略……
export DISPLAY=:0.0
[root@localhost database]# source /etc/profile
[root@localhost database]# xhost +
access control disabled, clients can connect from any host
[oracle@localhost database]$ ls
doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html
[oracle@localhost database]$ ./runInstaller 
正在启动 Oracle Universal Installer...

检查临时空间: 必须大于 120 MB。   实际为 7320 MB    通过
检查交换空间: 必须大于 150 MB。   实际为 2047 MB    通过
检查监视器: 监视器配置至少必须显示 256 种颜色。    实际为 16777216    通过
准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2020-07-19_10-32-04AM. 请稍候...[oracle@localhost database]$ 

通过开放修改后/etc/profile文件后,即可正常安装oracle。

在这里插入图片描述



3 备注:若安装过程中出现oracle安装界面乱码

若安装过程中出现oracle安装界面乱码,则参考我的另一篇博客进行解决。

博客名称:

解决Linux下oracle安装界面乱码


博客地址:

https://blog.csdn.net/Zhangyanfeng1/article/details/107455271



版权声明:本文为Zhangyanfeng1原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。