zoukankan      html  css  js  c++  java
  • 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 install -y git
    git clone https://github.com/novnc/noVNC.git   //从GitHub 克隆
    
    cd ./noVNC/utils/
    git clone https://github.com/novnc/websockify.git
    openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
    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.]])
    >>> 
  • 相关阅读:
    搞懂 Python 中多继承与Mixin设计模式
    Python 中的新式类和经典类的区别?
    值得收藏!15个 Pythonic 的代码示例
    windows启动nacos1.3.2
    Linux完成MySQL安装,本地连接时出现1064错误
    vagrant安装的坑
    AvaloniaUI TextBox 不能显示中文的问题解决
    [笔记] zookeeper 本地测试部署
    docker: Error response from daemon: Ports are not available
    smartsql 入门使用踩坑笔记
  • 原文地址:https://www.cnblogs.com/majianyu/p/10113601.html
Copyright © 2011-2022 走看看