关于在Linux系统中配置VNC Server的方法,网上有很多的教程或者文章,但应用在我们的环境中时都不能完整解决我们的问题,所以这里我将在RedHat 6.0中配置VNC Server中的方法,以及可能遇到问题的解决办法总结在这里,供大家参考。 相关阅读: VNC的安装配置 http://www./Linux/2013-05/84941.htm CentOS 6.3安装和配置VNC http://www./Linux/2013-05/84668.htm Linux下强制不检测依赖安装VNC http://www./Linux/2013-05/84075.htm CentOS6 VNC服务安装配置 http://www./Linux/2013-04/82510.htm VNC远程控制安装和设置 http://www./Linux/2013-01/77769.htm Windows远程桌面访问Ubuntu 12.04 之安装VNC http://www./Linux/2012-07/64801.htm 1、 查询系统是否安装vnc-server [root@localhost ~]# rpm –qa | grep vnc 如果有返回值,类似于vnc-server-的值,说明已经安装了vnc-server
网上大都搜到的方法是输入 [root@localhost ~]# yum install tigervnc-server 但是在我们的环境中执行时却提示:No package tigervnc-server available. 所以只能采用另一种办法,就是先执行 [root@localhost ~]# yum search vnc 在返回结果中找到可用的包,再相应执行对应的包即可。 [root@localhost ~]# yum install vnc-server
输入 [root@localhost ~]# vi /etc/sysconfig/vncservers 内容如下: # The VNCSERVERS variable is a list of display:user pairs. # # Uncomment the lines below to start a VNC server on display :2 # as my 'myusername' (adjust this to your own). You will also # need to set a VNC password; run 'man vncpasswd' to see how # to do that. # # DO NOT RUN THIS SERVICE if your local area network is # untrusted! For a secure way of using VNC, see # <URL:http://www.uk.research./archive/vnc/sshvnc.html>.
# doing so through a secure tunnel. See the "-via" option in the # `man vncviewer' manual page.
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost" 按照注释的说明就可以知道该如何配置了。 在文件最后加上 VNCSERVERS="1:root" 这样即完成了root用户的配置,VNCSERVERARGS参数这一行可以不进行设置。 这里有两点要注意: 1)VNCSERVERS=后面可以支持多用户,以空格隔开。如: VNCSERVERS="1:myusername 15:otheruser"--->这里的1 和15是端口号,用于连接时的端口 2)VNCSERVERARGS后面的[]里面的数据要与VNCSERVERS后面对应用户的值要一致。 VNCSERVERARGS基本参数有: -geometry 桌面大小,缺省是1024x768 -nohttpd 不监听HTTP端口 -nolisten tcp 不监听X端口 -localhost 只允许从本机访问 -AlwaysShared 默认的, 同时只能有一个vncviewer连接(跟客户端配置也有关), 一旦第2个连上去, 第1个就被断开了. 此参数允许同时连多个vncviewer -SecurityTypes None登录不需要密码认证 VncAuth默认值,要密码认证 ![]() |
|