Install VNC on Linux

I have a deticated server, It seems to have XWindows installed. How can i install VNC on it? I only access the server using putty or Ftp at the moment. Is there a command I can use in putty that wil install and run the vnc server?
andyakiraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
You install VNC and then run the vncserver program specificying a few things.  Then you can connect to it.

This is a tutorial of sorts:
http://linux.about.com/od/linux101/l/blnewbie4_3_11.htm

And this might help a little:
http://www.rhic.bnl.gov/RCF/UserInfo/Software/VNC/vnc.html
slyongCommented:
Alternatively, you can use XWindows.. Download cygwin from http://www.cygwin.com/ (with X) then you can just ssh -Y into you Linux box.
andyakiraAuthor Commented:
I need to install VNC server on the linux box, its a deticated server miles away from me. I have no pyshical access to it.  I only access it by putty or FTP at the moment. I need know how i can install VNC server using putty from my windows box. I have read those articles they just explain what VNC is, which is no help to me because I havnt even installed it on the linux box yet.
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Lee W, MVPTechnology and Business Process AdvisorCommented:
Do you think it might help if you told us what distro you are using?  
Lee W, MVPTechnology and Business Process AdvisorCommented:
Have you tried installing VNC?  Have you even downloaded it?
andyakiraAuthor Commented:
CentOS is the distro, 'Have you tried installing VNC?  Have you even downloaded it?' thats what I am trying to figure out. How i can download it and install it using putty.
Lee W, MVPTechnology and Business Process AdvisorCommented:
Is lynx or links installed?  If so, you can download the package through the use of those web browsers.

You can also try using yum, which I believe is the centos package management tool (I'm not familiar with YUM myself).  Try this command:
yum install vnc vnc-server
Of course, you may need root access to the server for this.
slyongCommented:
hi andyakira,

step by step instructions (like what leew said):

1) PuTTY into your Linux box
2) as root, issue the command "yum install vnc-server"
    2.1) if yum is not working, download the rpm using "wget http://mirror.pacific.net.au/linux/CentOS/4.2/os/i386/CentOS/RPMS/vnc-server-4.0-8.1.i386.rpm" (or your favourite mirror http://www.centos.org/modules/tinycontent/index.php?id=13).
    2.2) install vncserver by the command "rpm -Uvh vnc-server-4.0-8.1.i386.rpm"
3) start vncserver by "vncserver :0".  You will be asked for password
4) try to vnc into your Linux box from Windows to your Linux box using :0
    4.1)  if it doesn't work, bring down your firewall by doing "service iptables stop" and vnc from your Windows again
5) stop the vncserver by using command "vncserver -kill :0"
6) remember to bring your firewall back up "service iptables start"
7) you might want to have gnome, kde running.. in that case look into your ~/.vnc/xstartup file, uncomment two lines (# unset SESSION_MANAGER and # exec /etc/X11/xinit/xinitrc)
8) you might want to start vncserverm when the system reboots, use "chkconfig --level 345 vncserver on"
slyongCommented:
ooh forgot to mention vncserver is using port "5900 + display number" default I think so you have to poke a hole in the firewall for port 5900 if you are running firewall... or you can specify which ever port you want using the option -rfbport when issuing the command vncserver (which will be passed into Xvnc).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.