noVNC 是一个 HTML5 VNC 客户端,采用 HTML 5 WebSockets, Canvas 和 JavaScript 实现,noVNC 被普遍用在各大云计算、虚拟机控制面板中,比如 OpenStack Dashboard 和 OpenNebula Sunstone 都用的是 noVNC。
noVNC 采用 WebSockets 实现,但是目前大多数 VNC 服务器都不支持 WebSockets,所以 noVNC 是不能直接连接 VNC 服务器的,需要一个代理来做 WebSockets 和 TCP sockets 之间的转换。这个代理在 noVNC 的目录里,叫做 websockify 。
CENTOS7安装脚本
#!/bin/bash # stop selinux and iptables setenforce 0
systemctl stop firewalld
systemctl disable firewalld # install vncserver and git yum install -y epel*
yum install tigervnc-server git -y
vncserver :1 # 此时会提示输入密码 # download noVNC git clone git://github.com/kanaka/noVNC # create secure connection cd ./noVNC/utils/
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem # run noVNC cd ../
./utils/launch.sh --vnc localhost:5901 # running