新聞中心
什么是noVNC

noVNC 是一個(gè) HTML5 VNC 客戶端,采用 HTML 5 WebSockets, Canvas 和 JavaScript 實(shí)現(xiàn),noVNC 被普遍用在各大云計(jì)算、虛擬機(jī)控制面板中,比如 OpenStack Dashboard 和 OpenNebula Sunstone 都用的是 noVNC。
noVNC 采用 WebSockets 實(shí)現(xiàn),但是目前大多數(shù) VNC 服務(wù)器都不支持 WebSockets,所以 noVNC 是不能直接連接 VNC 服務(wù)器的,需要一個(gè)代理來做 WebSockets 和 TCP sockets 之間的轉(zhuǎn)換。這個(gè)代理在 noVNC 的目錄里,叫做 websockify 。
實(shí)驗(yàn)環(huán)境
VMware Workstations
帶桌面的centos7虛擬機(jī)
Windows 10 宿主機(jī) + Google Chrome瀏覽器
關(guān)閉防火墻
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
安裝noVNC
安裝依賴軟件包
yum install -y epel*
yum install -y git
yum install -y tigervnc-server
執(zhí)行以下命令并輸入密碼啟動(dòng)服務(wù)
vncserver :1
安裝noVNC
git clone git://github.com/kanaka/noVNC
創(chuàng)建安全連接(一路回車下去...)
cd ./noVNC/utils/
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
注: VNC的默認(rèn)會(huì)話不是安全的,需要?jiǎng)?chuàng)建一個(gè)安全的VNC連接。創(chuàng)建完畢的證書 self.pem 需要放置到 noVNC/utils 目錄下,當(dāng)啟動(dòng) noVNC 時(shí),websockify將自動(dòng)裝載證書。
運(yùn)行noVNC
# 在noVNC目錄下,執(zhí)行
./utils/launch.sh --vnc localhost:5901
測(cè)試連接
在瀏覽器訪問(注意替換成自己的IP地址) http://192.168.204.10:6080/vnc.html
輸入密碼,連接成功!
當(dāng)有請(qǐng)求訪問vnc時(shí),控制臺(tái)會(huì)顯示日志
適配于 CentOS 6 的安裝腳本
#!/bin/bash
# stop selinux and iptables
setenforce 0
service iptables stop
# install vncserver and git
yum install tigervnc-server git -y
vncserver :1
# 此時(shí)會(huì)提示輸入密碼
# 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
適配于 CentOS 7 的安裝腳本
#!/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
# 此時(shí)會(huì)提示輸入密碼
# 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
本文題目:CentOS安裝noVNC,以Web方式交付VNC遠(yuǎn)程連接
標(biāo)題來源:http://www.5511xx.com/article/cdpodsg.html


咨詢
建站咨詢
