novnc安装教程
Posted majianyu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了novnc安装教程相关的知识,希望对你有一定的参考价值。
适配于centos7
1.安装vncserver
# 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 # 此时会提示输入密码
2、安装novnc
yum istall -y git git clone https://github.com/novnc/noVNC.git //从GitHub 克隆 cd noVNC ./utils/launch.sh --vnc localhost:5901 WebSocket server settings: - Listen on :6080 - Web server. Web root: /vnc/noVNC - No SSL/TLS support (no cert file) - proxying from :6080 to 192.168.1.32:5901 Navigate to this URL: //跳转 http://compute2:6080/vnc.html?host=compute2&port=6080 访问 http://localhost:6080/vnc.html
3、以上操作只能连接本机,高级用法
cd novnc mkdir token cat token.conf abc123: 192.168.1.32:5900 abc456: 192.168.1.32:5901 abc123: 192.168.1.33:5900 pwd /root/noVNC/token 代理服务器执行 yum install -y screen //新开screen 窗口输入、防止被打断 screen -R vnc //这里会进入一个新的会话窗口 ./utils/websockify/websockify.py --web ./ --target-config=./token/token.conf 8787 ctrl a +d 退出screen http://192.168.1.202:8787/vnc.html?path=?token=abc123 //这里的token改为对应的token
4、速度慢,安装numpy
cd /usr/local/src wget http://jaist.dl.sourceforge.net/project/numpy/NumPy/1.8.2/numpy-1.8.2.tar.gz tar xvf numpy-1.8.2 cd numpy-1.8.2 ##yum install python-devel 缺少什么就装一下 python setup.py install
5、查看是否安装成功
>>> from numpy import * >>> eye(4) array([[ 1., 0., 0., 0.], [ 0., 1., 0., 0.], [ 0., 0., 1., 0.], [ 0., 0., 0., 1.]]) >>>
以上是关于novnc安装教程的主要内容,如果未能解决你的问题,请参考以下文章