noVNC installation, configuration and use

Recently, remote terminal control has been used in the project. I found noVNC, a magical guy, from all sides. Without further ado, I began to introduce its installation, configuration and use.

1. Download noNVC

There are many channels to download to noVNC, you can directly visit the official website of noVNC http://kanaka.github.io/noVNC/ , directly download the Zip file, unzip and install. The most convenient is to use git to install.

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

Then we cut into the noVNC directory.

cd noVNC

2. Install vncserver

sudo apt-get install tightvncserver

vncserver :1

 

It means that when you vncserver :1set it to 1, the port number to run noVNC below should be 5900+1, which is 5901.

3. Create a secure connection

openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem

At this time, you will find that you are prompted to enter the content. We do not need to fill in all these fields. I only filled in Common Name (e.g. server FQDN or YOUR name) []:this field during the configuration process. The content filled in is the hostname of the machine. Press Enter all the way to complete the creation, so easy.  
Create The completed certificate self.pemneeds to be placed in the noVNC/utilsdirectory. When noVNC is started, websockify will automatically load the certificate.

Copy command: cp self.pem noVNC/utils

4. Run noVNC

./utils/launch.sh --vnc access machine IP: 5901/5900

After the service starts, a link address is displayed, for example:

http:/localhost:6080/vnc.html?host=localhost&port=6080

Enter the address into the browser address bar, you can see the following page 

Host is the IP of the machine, you can also fill in the hostname. Password is the login password of the machine. After entering it, you can connect.

At this point, we can happily use noVNC.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325898817&siteId=291194637