首页 > 其他 > 详细

novnc安装教程

时间:2018-12-13 14:07:41      阅读:202      评论:0      收藏:0      [点我收藏+]

适配于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安装教程

原文:https://www.cnblogs.com/majianyu/p/10113601.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!