阿里雲開年HI購季,爆款雲產品低至5折!點此購買html
送您一個最高1000元的阿里雲大禮包,快來領取吧~git
https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=pdhbtt9jgithub
---------------------------------------web
1、noVNC是什麼瀏覽器
2、測試系統bash
3、系統安裝桌面環境 服務器
4、安裝配置tigervncide
5、配置noVNC測試
6、自啓動設置
7、訪問測試
8、總結
9、問題
附:安裝numpy,解決鏈接速度慢:
---------------------------------------
1、noVNC是什麼
noVNC is a browser based VNC client implemented using HTML5 Canvas and WebSockets. You will either need a VNC server with WebSockets support (such as libvncserver) or you will need to use websockify to bridge between your browser and VNC server.
2、測試系統
CentOS6.4 64位 系統須要能鏈接互聯網
IP:192.168.175.128
3、系統安裝桌面環境
# yum groupinstall "X Window System" "Desktop" -y
4、安裝配置tigervnc
# yum install tigervnc-server # vncserver //輸入vnc登錄密碼 # service vncserver restart //重啓服務,出現錯誤 Starting VNC server: no displays configured [FAILED]
解決辦法:
# vi /etc/sysconfig/vncservers //在最後添加如下兩行 VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 1024x768"
5、配置noVNC
登錄https://kanaka.github.io/noVNC/ 下載該包並解壓:
# cd kanaka-noVNC-6a90803/utils # ./launch.sh --vnc localhost:5901 //系統必須聯網
6、自啓動設置
# cat /etc/rc.local ./root/kanaka-noVNC-6a90803/utils/launch.sh --vnc localhost:5901 & # chkconfig vncserver on
7、訪問測試
http://192.168.175.128:6080/vnc_auto.html
建議使用火狐瀏覽器(IE和獵豹打不開,提示不支持畫布)
8、總結
第一種方式(本文使用,打在模板中使用):
代理和vnc都在虛機自身安裝,默認使用6080端口:
./launch.sh --vnc localhost:5901 vnc_auto.html -> 192.168.175.128:6080 -> websockify.py -> localhost:5901
第二種方式:
只部署一臺代理服務器,每臺虛機只須要安裝vnc服務便可;
./websockify.py 8000 192.168.2.21:5901 vnc_auto.html -> 192.168.175.130:8000 -> websockify.py -> 192.168.175.128:5901
9、問題
0.最終仍是經過虛機IP+PORT鏈接,若是虛機網卡宕掉,沒法鏈接;
1.連入vnc以後不須要root密碼直接能夠登陸;
2.鏈接速度太慢,安裝numpy可解決,見博客最後;
3.畫質很差。
附:安裝numpy,解決鏈接速度慢:
1.在官網上下載該包:http://sourceforge.net/projects/numpy/files/
2.解壓
3.cd進入解壓後的路徑
4.輸入命令
python setup.py install
5.安裝完成