Categories: Core Linux

How to Install VNC on Linux(CentOS ) Server ?

Check if the VNC server is already installed or not

rpm -qa vnc-server

If you get an output as “package vnc-server is not installed” you can begin with the installation.
Install VNC server with the following Command

yum install vnc-server

Now check if VNC client is installed on the server use the command

rpm -qa vnc

Install it if needed by using the following command

yum install vnc

Now lets install the Gnome Desktop and requirements by executing the command

IF you are using CentOS 5 ::-

yum groupinstall “GNOME Desktop Environment”

IF you are using CentOS 6 ::-

yum groupinstall Desktop

On CentOS 5 you may get error regarding “libgaim.so.0? if so, you may use below steps to overcome by using

yum –exclude=nautilus-sendto groupinstall “GNOME Desktop Environment”

Now lets create user to access the server

useradd test

To allow its access by configuring the configuration file /etc/sysconfig/vncservers with the following parameters

VNCSERVERS=”5:test”
VNCSERVERARGS[1]=”-geometry 800×600?

Now lets set password for the user

su – test

vncpasswd

If you wish to use root user to be accessed using VNC use following setting in /etc/sysconfig/vncservers

VNCSERVERS=”5:root”
VNCSERVERARGS[1]=”-geometry 800×600?

As root execute

vncpasswd

 

Check  the port on which the service is functioning with the command

ps -faux  | grep vnc

 

To start VNC server issue command

vncserver -kill :5

To start VNC server issue command

vncserver :5

Now you can access the server graphically as illustrated below

 

You will get a prompt as

 

On connecting you will get message as below

 

 


Vishwajit Kale
Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.

Recent Posts

The Ultimate Guide to WordPress Maintenance: Tips and Tricks

When you’re running a business that relies on website traffic and sales to succeed. Then you need to keep it…

4 days ago

Migrate In 2024: Our Comprehensive Website Migration Manual to the Next Level

Migration! Yes, this word is very big in the web hosting industry and it has its importance. Especially for businesses…

6 days ago

Unveiling the Importance of Server Maintenance Plans: A Comprehensive Guide

The server is the backbone of the web hosting industry and it acts like a HERO in the web hosting…

2 weeks ago

IP Address is Blocked? A handpicked list of Solutions to Fix it?

Imagine you are on holiday having a cup of tea and browsing your website or blog.Then, what next?You will get…

3 weeks ago

Explained: Difference between Nameservers Vs. DNS

The web hosting industry is growing every minute, day, and year. It has many terminologies that are important to understand…

1 month ago