CentOS installation Novnc, web-delivered VNC remote connection

Source: Internet
Author: User
Tags git clone

What is Novnc

NoVNC is a HTML5 VNC client with HTML 5 WebSockets, Canvas and JavaScript implementations, and NoVNC is commonly used in cloud computing, virtual machine control panels such as OpenStack Dashboard and Op Ennebula Sunstone all used NoVNC.
NoVNC is implemented with WebSockets, but most VNC servers currently do not support WebSockets, so NoVNC is not directly connected to the VNC server and requires an agent to convert between WebSockets and TCP sockets. This agent is in the NoVNC directory, called Websockify.

Experimental environment
    1. VMware Workstations
    2. CentOS7 Virtual machine with desktop
    3. Windows 10 host + Google Chrome browser
Shutting down the firewall
setenforce 0systemctl stop firewalldsystemctl disable firewalld
Installing NOVNC

Installing dependent Packages

yum install -y epel*yum install -y gityum install -y tigervnc-server

Execute the following command and enter the password to start the service

vncserver :1

Installing NOVNC

git clone git://github.com/kanaka/noVNC

Create a secure connection (go all the way down ...) )

cd ./noVNC/utils/openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem

Note: The default session of VNC is not secure and requires creating a secure VNC connection. The created certificate self.pem needs to be placed in the noVNC/utils directory, and Websockify will automatically load the certificate when NoVNC is started.
Run Novnc

# 在noVNC目录下,执行./utils/launch.sh --vnc localhost:5901

Test connection

In browser access (note Replace with your own IP address) http://192.168.204.10:6080/vnc.html
Enter the password, the connection is successful!

When there is a request to access VNC, the console displays the log

Installation script for CentOS 6
#!/bin/bash# stop selinux and iptablessetenforce 0service iptables stop# install vncserver and gityum install tigervnc-server git -yvncserver :1# 此时会提示输入密码# download noVNCgit clone git://github.com/kanaka/noVNC# create secure connectioncd ./noVNC/utils/openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem# run noVNCcd .././utils/launch.sh --vnc localhost:5901# running
Installation script for CentOS 7
#!/bin/bash# stop selinux and iptablessetenforce 0systemctl stop firewalldsystemctl disable firewalld# install vncserver and gityum install -y epel*yum install tigervnc-server git -yvncserver :1# 此时会提示输入密码# download noVNCgit clone git://github.com/kanaka/noVNC# create secure connectioncd ./noVNC/utils/openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem# run noVNCcd .././utils/launch.sh --vnc localhost:5901# running

CentOS installation Novnc, web-delivered VNC remote connection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.