博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
安装oracle是出现ocx,安装Oracle时可能碰到的常见问题-1
阅读量:5940 次
发布时间:2019-06-19

本文共 4757 字,大约阅读时间需要 15 分钟。

[root@localhost software]# yum install vnc

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

Resolving Dependencies

--&gt Running transaction check

---&gt Package tigervnc.x86_64 0:1.0.90-0.17.20110314svn4359.el6 will be installed

--&gt Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================

Package                    Arch                     Version                                            Repository             Size

====================================================================================================================================

Installing:

tigervnc                   x86_64                   1.0.90-0.17.20110314svn4359.el6                    dvd                   260 k

Transaction Summary

====================================================================================================================================

Install       1 Package(s)

Total size: 260 k

Installed size: 651 k

Is this ok [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Warning: RPMDB altered outside of yum.

Installing : tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64                                                                  1/1

Installed products updated.

Verifying  : tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64                                                                  1/1

Installed:

tigervnc.x86_64 0:1.0.90-0.17.20110314svn4359.el6

Complete!

执行:

[root@localhost bin]# ls -l vn*

-rwxr-xr-x. 1 root root 594840 Nov 10  2011 vncviewer

查看到已经安装的是vncviewer,相当于客户端。

还需要安装server端:

[root@localhost bin]# yum install tigervnc-server

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

Resolving Dependencies

--&gt Running transaction check

---&gt Package tigervnc-server.x86_64 0:1.0.90-0.17.20110314svn4359.el6 will be installed

--&gt Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================

Package                         Arch                   Version                                           Repository           Size

====================================================================================================================================

Installing:

tigervnc-server                 x86_64                 1.0.90-0.17.20110314svn4359.el6                   dvd                 1.1 M

Transaction Summary

====================================================================================================================================

Install       1 Package(s)

Total download size: 1.1 M

Installed size: 2.8 M

Is this ok [y/N]: y

Downloading Packages:

tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm                                                   | 1.1 MB     00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64                                                           1/1

Installed products updated.

Verifying  : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64                                                           1/1

Installed:

tigervnc-server.x86_64 0:1.0.90-0.17.20110314svn4359.el6

Complete!

再执行[root@localhost bin]# ls -l vn*

-rwxr-xr-x. 1 root root  86472 Nov 10  2011 vncconfig

-rwxr-xr-x. 1 root root  19912 Nov 10  2011 vncpasswd

-rwxr-xr-x. 1 root root  20085 Nov 10  2011 vncserver

-rwxr-xr-x. 1 root root 594840 Nov 10  2011 vncviewer

可以看到服务端需要的可执行文件都已经安装了,其中vncconfig是用于配置,vncpasswd是用于密码管理。

设置好VNC的密码之后,就可以启动VNC Server了。

[root@localhost ~]# vncserver

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost.localdomain:1.log

但此时如果想登录到界面,还需要配置:

1. 防火墙,上面显示的是:1,就需要配置5901端口:

[root@localhost ~]# iptables -I INPUT -p tcp --dport 5901 -j ACCEPT

2. 执行xhost +和配置DISPLAY,指示控制台可以显示到哪里,

[root@localhost ~]# xhost +

xhost:  unable to open display ""

直接执行xhost +会提示错误,此时应先配置DISPLAY变量:

[root@localhost ~]# export DISPLAY=:0.0

再次执行:

[root@localhost ~]# xhost +

access control disabled, clients can connect from any host

客户端可以从任意host连接。

现在从本机使用vncviewer打开IP,可以显示一个图形界面,但奇怪的是只能看到一些选项,不能登录到界面:

7626bdccbffa3f17b9ea069139c1122c.png

如果配置VNC图形桌面环境为KDE或GNOME桌面环境,还需要配置一个xstartup文件,

[root@testdb ~]# vi /root/.vnc/xstartup

修改文件:

#!/bin/sh

# Uncomment the following two lines for normal desktop:

unset SESSION_MANAGER

exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

twm &

保存之后重启一下VNCserver服务,方法:

[root@localhost .vnc]# vncserver -kill :1

Killing Xvnc process ID 1527

[root@localhost .vnc]# vncserver

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost.localdomain:1.log

转载地址:http://ehltx.baihongyu.com/

你可能感兴趣的文章
100多个基础常用JS函数和语法集合大全
查看>>
Java8 lambda表达式10个示例
查看>>
innerHTML outerHTML innerText
查看>>
kafka安装教程
查看>>
go语言基础
查看>>
LINQ to SQL活学活用(1):这要打破旧观念
查看>>
Spring boot 嵌入的tomcat不能启动: Unregistering JMX-exposed beans on shutdown
查看>>
【Windows】字符串处理
查看>>
Spring(十八):Spring AOP(二):通知(前置、后置、返回、异常、环绕)
查看>>
CentOS使用chkconfig增加开机服务提示service xxx does not support chkconfig的问题解决
查看>>
微服务+:服务契约治理
查看>>
save
查看>>
Android DrawLayout + ListView 的使用(一)
查看>>
clear session on close of browser jsp
查看>>
asp.net mvc Post上传文件大小限制 (转载)
查看>>
关于吃掉物理的二次聚合无法实现的需要之旁门左道实现法
查看>>
mysql出现unblock with 'mysqladmin flush-hosts'
查看>>
oracle exp/imp命令详解
查看>>
开发安全的 API 所需要核对的清单
查看>>
Mycat源码中的单例模式
查看>>