Wednesday, November 3, 2010

Setting UP VNC server on a CentOs or Redhat server


To set up VNC properly, so that you have access to the local
default X console of your server as if you are sitting in front
of the physical server.
follow these steps.

On the server, type vncpasswd as root to set a VNC password.
You will use this password when connecting with vncviewer

Edit the file /etc/X11/xorg.conf

In the stanza called Screen, add this line:
Option "passwordFile" "/root/.vnc/passwd"

then
add in the following lines at the end of the file:

Section "Module"
Load "glx"
Load "dbe"

Load "extmod"

Load "freetype"

Load "type1"

Load "dri"
Load "vnc"
EndSection

save the file

Allow the ports in the iptables Firewall
by typing the following:

system-config-securitylevel

In the "Other ports", add the following range.

5900-5904

Save and close the tool then restart the firewall by typing the following:
service iptables restart or /etc/init.d/iptables restart

type

chkconfig vncserver on

to have vncserver automatically start when the server next boots up.

Then finally RESTART the server.




No comments: