加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle中xhost报错

发布时间:2020-12-12 13:41:16 所属栏目:百科 来源:网络整理
导读:一.命令找不到 xhost:command not found yum whatprovides "*/xhost" Loaded plugins: product-id,security,subscription- managerThis system is not registered to Red Hat Subscription Management. You can use subscription- manager to register. bas

一.命令找不到

xhost:command not found

yum whatprovides "*/xhost"

Loaded plugins: product-id,security,subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
base/filelists_db                                                               | 3.4 MB     00:00 ...
xorg-x11-server-utils-7.7-2.el6.x86_64 : X.Org X11 X server utilities
Repo        : base
Matched from:
Filename    : /usr/bin/xhost

yum -y install xorg-x11-server-utils-7.7-2.el6.x86_64

?

二.安装oracle11g时出现xhost:? unable to open display "192.168.1.10:0.0"、打不开图形化界面等。

终极解决方法:
1.使用Xmanager中xshell登陆到要安装oracle服务的主机上的root用户;

2.关键的第一步:设置DISPLAY环境变量为登陆机器的IP地址(注意:这里你本机windows的IP地址,即你的xmanager的安装主机,我本机的IP是10.10.11.16);
# export DISPLAY=10.10.11.16:0.0
# echo $DISPLAY
10.10.11.16:0.0

注意:这块是0.0还是1.0查看xmanage左上角就可以看到,这里点击Xmanager - Broadcast

使用“xhost +”命令;
# xhost +
access control disabled,clients can connect from any host

4.切换到oracle用户;
# su - oracle

5.关键的二步:在oracle用户再一次设置DISPLAY环境变量为登陆机器的IP地址;
如果不操作这一步骤,su到oracle用户后这个环境变量可能会丢失——郁闷之所在。
$ export DISPLAY=10.10.11.16:0.0
$ echo $DISPLAY
10.10.11.16:0.0

6.另外两个关键注意事项;

a.用root用户登录修改
在 /etc/inittab -- init进程的主配置文件?把默认级别改為 5 : ??

?id:5:initdefault: ? ?#意思是从图形界面启动
b.设置连接属性

?

打开的图形化界面是乱码

?export LANG=en_US.UTF-8?切记使用oracle用户,先执行这个,在执行./runInstaller

?

?

还有一种方法:

使用vnc远程安装工具

vnc配置

1.安装vnc
yum install vnc-server
2.启动vnc
注意这里需要ps -ef |grep vncserver

vncserver

在root用户下启动,我们采用默认配置即可。
vncserver :1
会提示输入密码
3.通过vnc客户端连接l
vnc连接后打开终端,需要先设置DISPLAY
export DISPLAY=:1.0
注意:我们启动的vncserver是:1,因此我们定义DISPLAY时也需要设置成1.0,执行xhost + :
[[email?protected] ~]# xhost +
access control disabled,clients can connect from any host
否则启动xhost + 会报错:
[[email?protected] ~]# xhost +
xhost: unable to open display ":0.0"
4.vnc中安装oracle 11g
[[email?protected] ~]# xhost +
access control disabled,clients can connect from any host
[[email?protected] ~]# su - oracle
[[email?protected] ~]# cd /oracle11g/database
[[email?protected] ~]# ./runInstaller
执行完命令后会在vnc中打开安装界面,否则安装界面会打开在服务器本机上。

?

,在使用VNC远程安装时提示以下错误:>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.? ? Failed <<<<解决办法,检查是否设置了DISPLAY变量:1.在root下执行#xdpyinfo,记录下name of display:后的字符串,如? :392.在root下执行 #xhost +返回信息为: access control disabled,clients canconnect from any host3.切换到Oracle用户:#su – oracle4.在Oracle用户下执行命令:export DISPLAY=:395.在Oracle下执行xdpyinfo命令,如果能正常显示,说明设置成功重新安装即可。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读