VNC服务器端与客户端配置

本文介绍如何在Ubuntu服务器上安装及配置VNC,并通过Windows或Ubuntu客户端进行远程连接。主要内容包括下载安装包、安装VNC Server、注册license、启动服务等步骤。

环境:

server:ubuntu

client:Win7或ubuntu

服务器端

ubuntu

1:在VNC官网下载安装包

VNC for linux:VNC-5.0.5-Linux-x86-ANY.tar.gz

VNC for Windows:VNC-5.0.5-Windows.exe

2,安装VNC server

在ubuntu环境下执行命令:

hadoop@master-server:~/VNC-5.0.5-Linux-x86$ sudo ./vncinstall
Copying vncviewer to /usr/bin
Copying vncviewer.man to /usr/share/man/man1/vncviewer.1
Copying vncaddrbook to /usr/bin
Copying vncaddrbook.man to /usr/share/man/man1/vncaddrbook.1
Copying vncserver-x11 to /usr/bin
Copying vncserver-x11.man to /usr/share/man/man1/vncserver-x11.1
Copying vncserver-x11-core to /usr/bin
Copying Xvnc to /usr/bin
Copying Xvnc.man to /usr/share/man/man1/Xvnc.1
Copying Xvnc-core to /usr/bin
Copying vncserverui to /usr/bin
Copying vncserver-virtual to /usr/bin
Copying vncserver-virtual.man to /usr/share/man/man1/vncserver-virtual.1
Copying vncserver-virtuald to /usr/bin
Copying vncserver-virtuald.man to /usr/share/man/man1/vncserver-virtuald.1
Copying vncserver-x11-serviced to /usr/bin
Copying vncserver-x11-serviced.man to /usr/share/man/man1/vncserver-x11-serviced.1
Copying vncpasswd to /usr/bin
Copying vncpasswd.man to /usr/share/man/man1/vncpasswd.1
Copying vnclicense to /usr/bin
Copying vnclicense.man to /usr/share/man/man1/vnclicense.1
Copying vnclicensewiz to /usr/bin
Copying vncpipehelper to /usr/bin
Copying vncchat to /usr/bin
Copying vncinitconfig to /usr/bin
Copying vncinitconfig.man to /usr/share/man/man1/vncinitconfig.1
Copying get_primary_ip4 to /usr/lib/vnc
Copying vncelevate to /usr/lib/vnc
Updating /etc/pam.d/vncserver
Updating /etc/pam.conf
Looking for font path...  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins (from xset).
Generating private key:
  p: ................................................................................
  q: ........................................................
Installed init script for VNC X11 Service-mode daemon
Start and stop the service with:
  /etc/init.d/vncserver-x11-serviced (start|stop)

Installed init script for VNC Virtual-mode daemon
Start and stop the service with:
  /etc/init.d/vncserver-virtuald (start|stop)
2,注册license

hadoop@master-server:~/VNC-5.0.5-Linux-x86$ sudo ./vnclicense
VNC(R) Licensing Utility 5.0.5 (r106461) 
Built on Mar  4 2013 13:50:05
Copyright (C) 2002-2013 RealVNC Ltd.
VNC is a registered trademark of RealVNC Ltd. in the U.S. and in other
countries.
Protected by UK patent 2481870.
See http://www.realvnc.com for information on VNC.
For third party acknowledgements see:
http://www.realvnc.com/products/vnc/documentation/5.0/acknowledgements.txt

Usage: vnclicense COMMAND

Commands:
  -add KEY       Add KEY
  -remove        Remove the key if there is only one installed
  -remove N      Remove Nth key shown by "-list"
  -remove KEY    Remove KEY if it is installed
  -list          List installed keys
  -check         Print the number of desktops. Returns 0 if license
                 installed is valid

3,添加license key

hadoop@master-server:~/VNC-5.0.5-Linux-x86$ vnclicense -check
No licenses installed.

hadoop@master-server:~/VNC-5.0.5-Linux-x86$ sudo ./vnclicense -add WHJRK-UXY7V-Q34M9-CZU8L-8KGFA
Enterprise license key has been successfully applied.

4,启动vncserver

hadoop@master-server:~$ vncserver-virtual
VNC(R) Server 5.0.5 (r106461) 
Built on Mar  4 2013 13:46:20
Copyright (C) 2002-2013 RealVNC Ltd.
VNC is a registered trademark of RealVNC Ltd. in the U.S. and in other
countries.
Protected by UK patent 2481870.
See http://www.realvnc.com for information on VNC.
For third party acknowledgements see:
http://www.realvnc.com/products/vnc/documentation/5.0/acknowledgements.txt


Running applications in /etc/vnc/xstartup

VNC Server signature: 82-b1-2d-ab-55-28-ea-72
Log file is /home/hadoop/.vnc/master-server:1.log
New desktop is master-server:1 (地址:1)

客户端

Win7
1,运行VNC-5.0.5-Windows.exe

2,输入IP:会话号,如*.*.*.*:1

即可远程

ubuntu

包:VNC-5.0.5-Linux-x86-ANY.tar.gz

hadoop@slave5:~/VNC-5.0.5-Linux-x86$ sudo ./vncviewer
[sudo] password for hadoop:
hadoop@slave5:~/VNC-5.0.5-Linux-x86$ ./vncviewer
hadoop@slave5:~/VNC-5.0.5-Linux-x86$ ./vncviewer 122.205.7.180:1
hadoop@slave5:~/VNC-5.0.5-Linux-x86$




VNC(Virtual Network Computing,虚拟网络计算)最早是一套由英国剑桥大学AT&T实验室在2002年开发的轻量型的远程控制计算机软件,其采用了 GPL 授权条款,任何人都可免费取得该软件。VNC软件主要由两个部分组成:VNC server及VNC viewer。用户需先将VNC server安装在被控端的计算机上后,才能在主控端执行 VNC viewer 控制被控端。 VNC server VNC viewer 支持多种操作系统,如 windows,Linux,MacOS 及 Unix 系列(Unix,Solaris等),因此可将 VNC server 及 VNC viewer 分别安装在不同的操作系统中进行控制。RealVNC 的优越性还在于如果操作系统的主控端计算机没有安装 VNC viewer,也可以通过一般的网络浏览器(如 IE 等)来控制被控端(需要 Java 虚拟机的支持)。 整个 VNC 一般运行的工作流程如下: (1) VNC 客户端通过浏览器或 VNC Viewer 连接至 VNC Server。 (2) VNC Server 传送一对话窗口至客户端,要求输入连接密码(可能为空),以及存取的 VNC Server 显示装置。 (3) 在客户端输入连接密码后,VNC Server 验证客户端是否具有存取权限。 (4) 若是客户端通过 VNC Server 的验证,客户端即要求 VNC Server 显示桌面环境。 (5) 被控端将画面显示控制权交由 VNC Server 负责。 (6) VNC Server 将把被控端的桌面环境利用 VNC 通信协议送至客户端,并且允许客户端控制 VNC Server 的桌面环境及输入装置。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值