How to Install and Configure Vncserver into Centos-7

In this section you will learn How to Install and Configure Vncserver into Centos-7

Step 1: ssh to hosts and be the root user

               
sudo -i
                
               

Type the following commands to install all packages

               
yum groupinstall GNOME Desktop -y
yum install tigervnc-server xorg-x11-fonts-Type1 -y       
                
               

Create copy of service file

               
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
                
               

Edit service file

               
vi /etc/systemd/system/vncserver@:1.service

Change <USER> with your username 

                
               

Add port if firewall enabled

               
firewall-cmd --permanent --zone=public --add-port=5901/tcp
firewall-cmd --reload

                
               

Switch to your user which one you added in service file

               
su - addedusername
                
               

Run following Command and create password for vnc

               
vncserver
                
               

Again be the root user

               
sudo -i OR su - root
                
               

Run following commands

               
systemctl daemon-reload
systemctl start vncserver@:1.service
systemctl enable vncserver@:1.service
                
               

Now open vnc viewer into your desktop and create new connection

Streamset cloudera

Click ok and provide password

Streamset cloudera

Congrats you have configure vncserver successfully

Streamset cloudera