Make sure the desktop is installed# yum groupinstall "GNOME Desktop"
Install TigerVNC and other dependency# yum install tigervnc-server xorg-x11-fonts-Type1
Setup the VNC server config file
Copy the file “/lib/systemd/system/vncserver@.service” to “vncserver@:<Port_Number>.service”.
While Copying the VNC config file we can mention the port number on which we want VNC service to be listen. In my case I am using port 7 and 8, it means VNC will listen on “5907” and “5908”. So while Connecting to the VNC server We can specify port number as <IP_Address_VNC_Server:7> and <IP_Address_VNC_Server:8> or <IP_Address_VNC_Server:5907> and <IP_Address_VNC_Server:5908>.# cd /lib/systemd/system
# cp vncserver@.service vncserver@:7.service
# cp vncserver@.service vncserver@:8.service
Update user’s information in the config file
For instance of port number :7# vim vncserver@:7.service
1 | [Unit] |
Set the firewall rule if firewall is enabled on your Linux# firewall-cmd --permanent --zone=public --add-port=5901-5999/tcp
# firewall-cmd --reload
Start and enable VNC service at boot# systemctl daemon-reload
# systemctl start vncserver@:7.service
# systemctl start vncserver@:8.service
# systemctl enable vncserver@:7.service
# systemctl enable vncserver@:8.service