[Tutorial]Howto install and configure VNC Server on CentOS 6.3 or Redhat RHEL

Discussion in 'Server Management' started by Brollurge, Mar 26, 2013.

  1. Brollurge

    Brollurge New Member

    Hello WJ member.I've made some tutorials about Network, System, Security, Cloud Computing, VoiceNow i'd like to share a tutorial "Howto install and configure VNC Server on CentOS 6.3 or Redhat RHEL". Hope it's useful to you!

    1. Install GNOME Desktop Environnement:

    Quote: [[email protected] ~]# yum -y groupinstall GNOME Desktop Environment 2. Install KDE Desktop Environnement:

    Quote: [[email protected] ~]# yum groupinstall X Window System KDE (K Desktop Environment) 3. Install VNC Server:

    Quote: [[email protected] ~]# yum -y install vnc-server
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    * base: mirror-fpt-telecom.fpt.net
    * extras: mirror-fpt-telecom.fpt.net
    * updates: mirror-fpt-telecom.fpt.net
    Setting up Install Process
    Resolving Dependencies
    > Running transaction check
    > Package tigervnc-server.i686 0:1.0.90-0.17.20110314svn4359.el6 will be installed
    > Finished Dependency Resolution

    Dependencies Resolved

    ================================================== ==============================
    Package Arch Version Repository
    Size
    ================================================== ==============================
    Installing:
    tigervnc-server i686 1.0.90-0.17.20110314svn4359.el6 base 1.1 M

    Transaction Summary
    ================================================== ==============================
    Install 1 Package(s)

    Total download size: 1.1 M
    Installed size: 2.9 M
    Downloading Packages:
    tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686.rpm | 1.1 MB 00:02
    warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    Importing GPG key 0xC105B9DE:
    Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <[email protected]/* */>
    Package: centos-release-6-3.el6.centos.9.i686 (@anaconda-CentOS-201207051201.i386/6.3)
    From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Installing : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686 1/1
    Verifying : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686 1/1

    Installed:
    tigervnc-server.i686 0:1.0.90-0.17.20110314svn4359.el6

    Complete!
    [[email protected] ~]# 4. Configure a VNC user:

    Quote: [[email protected] ~]# su -jackiebui
    [[email protected] ~]# vncpasswd
    Password:******
    verify:******
    [[email protected] ~]# ls .vnc/ 5. Edit VNC Configuration File:

    Quote: [[email protected] ~]# vi /etc/sysconfig/vncservers
    # The VNCSERVERS variable is a list of display:user pairs.
    #
    # Uncomment the lines below to start a VNC server on display :2
    # as my myusername (adjust this to your own). You will also
    # need to set a VNC password; run man vncpasswd to see how
    # to do that.
    #
    # DO NOT RUN THIS SERVICE if your local area network is
    # untrusted! For a secure way of using VNC, see this URL:
    # http://kbase.redhat.com/faq/docs/DOC-7028

    # Use -nolisten tcp to prevent X connections to your VNC server via TCP.

    # Use -localhost to prevent remote VNC clients connecting except when
    # doing so through a secure tunnel. See the -via option in the
    # `man vncviewer manual page.

    VNCSERVERS=1:jackiebui //Uncomment 2 last lines, and edit your VNC user
    VNCSERVERARGS[2]=-geometry 800600 -nolisten tcp -localhost // Save and exit 6. Start VNC Server:

    Quote: [[email protected] ~]# vncserver
    [[email protected] ~]# chkconfig vncserver on //VNCll start at boot 7. Now use VNC viewer to connect to VNC Server:
    8. Type your VNC password:
    9. Now you can access your VNC Server from everywhere:

    That's all. If you have any problems,just comment here,i'll reply ASAP! Last edited by jackiebi; 19th Dec 2012 at 03:12 PM. Thanks,

    Could this steps are same for centos 5.8 ? . and why you installed GNOM and KDE ? did it not work without them ? I've never installed VNC Server on centos 5.8 before,but i think it's the same. You've to install GNOM or KDE Desktop Environnement in order to get a full-featured GUI desktop i installed everything on centos 6.0 x32bit and when i start vncserver it give me this error

    [[email protected] ~]# vncserver

    WARNING: The first attempt to start Xvnc failed, possibly because the font
    catalog is not properly configured. Attempting to determine an appropriate
    font path for this system and restart Xvnc using that font path ...
    Could not start Xvnc.


    Xvnc TigerVNC 1.1.0 - built Feb 22 2013 22:24:01
    Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
    See http://www.tigervnc.org for information on TigerVNC.
    Underlying X server release 11300000, The X.Org Foundation

    Initializing built-in extension Generic Event Extension
    Initializing built-in extension SHAPE
    Initializing built-in extension MIT-SHM
    Initializing built-in extension XInputExtension
    Initializing built-in extension XTEST
    Initializing built-in extension BIG-REQUESTS
    Initializing built-in extension SYNC
    Initializing built-in extension XKEYBOARD
    Initializing built-in extension XC-MISC
    Initializing built-in extension XFIXES
    Initializing built-in extension RENDER
    Initializing built-in extension RANDR
    Initializing built-in extension DAMAGE
    Initializing built-in extension MIT-SCREEN-SAVER
    Initializing built-in extension DOUBLE-BUFFER
    Initializing built-in extension RECORD
    Initializing built-in extension DPMS
    Initializing built-in extension X-Resource
    Initializing built-in extension XVideo
    Initializing built-in extension XVideo-MotionCompensation
    Initializing built-in extension VNC

    Tue Mar 26 20:38:39 2013
    vncext: VNC extension running!
    vncext: Listening for VNC connections on all interface(s), port 5901
    vncext: created VNC server for screen 0
    [dix] Could not init font path element catalogue:/etc/X11/fontpath.d, removing from list!
    [dix] Could not init font path element built-ins, removing from list!

    Fatal server error:
    could not open default font 'fixed'

    Xvnc TigerVNC 1.1.0 - built Feb 22 2013 22:24:01
    Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
    See http://www.tigervnc.org for information on TigerVNC.
    Underlying X server release 11300000, The X.Org Foundation

    Initializing built-in extension Generic Event Extension
    Initializing built-in extension SHAPE
    Initializing built-in extension MIT-SHM
    Initializing built-in extension XInputExtension
    Initializing built-in extension XTEST
    Initializing built-in extension BIG-REQUESTS
    Initializing built-in extension SYNC
    Initializing built-in extension XKEYBOARD
    Initializing built-in extension XC-MISC
    Initializing built-in extension XFIXES
    Initializing built-in extension RENDER
    Initializing built-in extension RANDR
    Initializing built-in extension DAMAGE
    Initializing built-in extension MIT-SCREEN-SAVER
    Initializing built-in extension DOUBLE-BUFFER
    Initializing built-in extension RECORD
    Initializing built-in extension DPMS
    Initializing built-in extension X-Resource
    Initializing built-in extension XVideo
    Initializing built-in extension XVideo-MotionCompensation
    Initializing built-in extension VNC

    Tue Mar 26 20:38:42 2013
    vncext: VNC extension running!
    vncext: Listening for VNC connections on all interface(s), port 5901
    vncext: created VNC server for screen 0
    [dix] Could not init font path element /usr/share/X11/fonts/misc, removing from list!
    [dix] Could not init font path element /usr/share/X11/fonts/Type1, removing from list!
    [dix] Could not init font path element built-ins, removing from list!

    Fatal server error:
    could not open default font 'fixed'
     

Share This Page