How to configure install VNC server on CentOS 8 / RHEL 8

In this article, we will be through a simple step by step installation guide describes how to install VNC server on CentOS 8 / RHEL 8 system.

VNC server installed on CentOS 8 / RHEL 8 Prerequisites

  • To install the VNC Server on your system, make sure you have the following requirements are available on the system:
  • GNOME Desktop Environment
  • root access
  • NFDNF / YUM package repository

Step by step guide to install VNC server on CentOS 8 / RHEL 8

Step 1) install the GNOME desktop environment

Before CentOS 8 / RHEL 8 installed VNC server, make sure you have a desktop environment (DE) is installed. If you have installed the GNOME desktop or install a server using the gui option, you can skip this step.

In CentOS 8 / RHEL 8 in, GNOME is the default desktop environment. If your system does not have it, use the following command to install:

After the successful installation of the above packages, run the following command to enable graphics mode

Now restart the system in order to obtain the GNOME login screen.

Once the system has successfully restarted, please cancel the line "WaylandEnable = false" comment file "/etc/gdm/custom.conf" in order to request xorg handled by the GNOME desktop via a remote desktop session vnc done, instead of Wayland Display Manager .

Note: Wayland is the default GNOME display manager (GDM), and the like are not configured to process X.org telepresence API.

Step 2) mounted VNC server (tigervnc- server)

Next, we will install the VNC server, there are many available VNC server, and for installation purposes, we will install TigerVNC server. It is one of the most popular VNC server, and is a high-performance, platform-independent VNC, it allows users to easily interact with remote computers.

Now, use the following command to install TigerVNC Server:

[root@linuxtechi ~]# dnf install tigervnc-server tigervnc-server-module -y

How to configure install VNC server on CentOS 8 / RHEL 8

Step 3) is provided to the local user password VNC

Suppose we want "pkumar" users using VNC remote desktop session, and then switch to the user and use vncpasswd command set their passwords,

Step 4) setting the VNC server profile

[Unit]
Description=Remote Desktop VNC Service
After=syslog.target network.target

ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -autokill %i
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target

How to configure install VNC server on CentOS 8 / RHEL 8

Save the file and exit,

Note: In the above file replacement for the username you set.

By default, the VNC server in listening tcp port 5900 + n, where n is a number, if the display number is "1", the VNC server listens for requests on which TCP port 5901.

Step 5) Start VNC service and allows ports in the firewall

I will display the number is set to 1, so please use the following command to start and enable the service on the display vnc number "1"

Use the following netstat command to verify whether or ss VNC server starts listening for requests on 5901,

How to configure install VNC server on CentOS 8 / RHEL 8

Use the following command to verify the status of systemctl VNC server,

How to configure install VNC server on CentOS 8 / RHEL 8

The output of the above command confirmed on port tcp port 5901 successfully launched the VNC. Use the following command allows the VNC server port "5901" in the operating system firewall,

How to configure install VNC server on CentOS 8 / RHEL 8

Step 6) is connected to a remote desktop session

Now, we are ready, you can view the remote desktop connection is working properly. To access a remote desktop, workstation boot from Windows Linux / VNC Viewer, and then enter the IP address and port number of the VNC server, and then press Enter.

How to configure install VNC server on CentOS 8 / RHEL 8

Next, it will ask you for your VNC password. Enter the password you created earlier for the local user, and then click "OK" to continue.

How to configure install VNC server on CentOS 8 / RHEL 8

Now you can see the remote desktop,

How to configure install VNC server on CentOS 8 / RHEL 8

In this way, you are already in Centos 8 / RHEL VNC server 8 successfully installed.

to sum up

Hope-step guide to install the VNC server on 8 CentOS 8 / RHEL provides all the information you can easily set up a VNC server and remote desktop access. Please provide your comments and suggestions in the feedback section below.

Guess you like

Origin www.linuxidc.com/Linux/2019-11/161623.htm