About Me

My photo
Hi Friends, I am Sandeep CC and some people know me as System Administrator. I have started my professional career from 2008. I have been working as System Administrator on Linux Server and Windows Client. I am here to share my Knowledge in which I have experienced and which I have come across till now, It could be help to you people. In case anything wrong or any improvements in my post steps, Please comment to the post, Feel free to contact me by posting comments on this blog. Thanks and Regards, Sandeep CC

Wednesday, October 23, 2013

Install & Configure VNCSERVER on REDHAT LINUX-5


INSTALLATION & CONFIGURATION OF VNCSERVER ON REDHAT LINUX


Requirement: VNCSERVER package (server end) & Client version for client side...

INSTALL PACKAGE:

[root@proxy2 ~]# rpm -ivh vnc-server-4.1.1-10.1.0.0.1.i386.rpm
Preparing...                ########################################### [100%]
        package vnc-server-4.1.2-9.el5 (which is newer than vnc-server-4.1.1-10.1.0.0.1) is already installed
        file /etc/rc.d/init.d/vncserver from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /etc/sysconfig/vncservers from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/Xvnc from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/vncconfig from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/vncpasswd from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/vncserver from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/x0vncserver from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/share/man/man1/vncserver.1.gz from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/share/vnc/classes/vncviewer.jar from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
[root@proxy2 ~]#

ADD ONE USER FOR VNCSERVER (For security purpose don't use root user)
[root@proxy2 ~]# useradd vncserver

GO TO VNCSERVER USER (ALSO YOU CAN CREATE PASSWORD FOR LOCAL USERLOGIN BY USING "PASSWD USERNAME" COMMAND)
[root@proxy2 ~]# su -l vncserver

CREATE VNC SERVER PASSWORD FOR CREATED USER (this password is must required for remote login)
[vncserver@proxy2 root]$ vncpasswd
Password:
Verify:
[vncserver@proxy2 root]$

ALLOW CREATED USER TO VNCSERVER (Uncomment last 2 lines & give user session , like 1st user '1:myuser')
[root@proxy2 ~]# cd /etc/sysconfig/
[root@proxy2 sysconfig]# ls -ltr |grep vncser
-rw-r--r-- 1 root root   847 Jan 15  2007 vncservers
[root@proxy2 sysconfig]# cp vncservers vncservers.org
[root@proxy2 sysconfig]#
[root@proxy2 sysconfig]# vi 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
# .
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# 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="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERS="1:vncserver" ------------------------------------------------------> ADD CREATED USER HERE
VNCSERVERARGS[1]="-geometry 1600x1200" ----------------------------------------> GIVE REQUIRED RESULATION TO VIEW

"vncservers" 23L, 911C written

#####MAKE ON VNCSERVER WHILE BOOTING SERVER#####
[root@proxy2 ~]# chkconfig --list |grep vncserver
vncserver       0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@proxy2 ~]# chkconfig --level 35 vncserver on
[root@proxy2 ~]# chkconfig --list |grep vncserver
vncserver       0:off   1:off   2:off   3:on    4:off   5:on    6:off
[root@eduproxy2 ~]#
[root@proxy2 sysconfig]#

##########SERVICE START############
[root@proxy2 sysconfig]# service vncserver start
Starting VNC server: 1:vncserver xauth:  creating new authority file /home/vncserver/.Xauthority
xauth: (stdin):1:  bad display name "proxy2.com:1" in "add" command
New 'proxy2.com:1 (vncserver)' desktop is proxy2.com:1
Creating default startup script /home/vncserver/.vnc/xstartup
Starting applications specified in /home/vncserver/.vnc/xstartup
Log file is /home/vncserver/.vnc/proxy2.com:1.log
                                                           [  OK  ]
[root@proxy2 sysconfig]#

### Go to Client machine###
Note: We can install vnc client version in any OS, I have installed and tried in XP platform...also we can open this vnc server on any java updated browser, you can see 2 steps also below...

Step-1: With VNC Client exe...




Step-2: Open in any java updated browser with default port 5801



No comments:

Post a Comment