--Step 1: At first we must prepare two packages named
vnc-4.1.2-9.el5.i386.rpm and
vnc-server-4.1.2-9.el5.i386.rpm, You can find the two
packages from the Operation install CDs of rhel5.
--Step 2: Login the user of root and copy the two
packages to where you will to be located of.
--Step 3: Install packages: (Open the terminal and cd to
the folder where you located the two packages).
# rpm –ivh vnc-4.1.2-9.el5.i386.rpm
# vnc-server-4.1.2-9.el5.i386.rpm
--Step 4: configure the environment of VNC(At forst the
three users must be created: root, oracle and rrosen )
#vi /etc/sysconfig/vncservers
#add lines as follows
VNCSERVERS="1:root 2:oracle 3:rrosen"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"
VNCSERVERARGS[3]="-geometry 1024x768 -depth 16"
--Step 5: configure the password and the environment for
the Vncserver users.
--For example: configure the user of root.
$su – root
Passwd:
#vncserver
# vi .vnc/xstartup
# add lines as follows
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
--The same operation for the other user. ( vi
/home/oracle/.vnc/xstart , vi /home/rrosen/.vnc/xstart )
--Attention 1: You must to execute “# vncserver” in
order to start the VNC server and automatic create the file
“xstartup” before you execute “# vi .vnc/xstartup” , the same
for other users.
--Attention 2: If you are not install the Desktop
Environment, you must at first do it as follow:
# yum groupinstall "GNOME Desktop Environment"
--command for the VNC:
--Start the vncserver
# service vncserver start
--Start the vncserver automatic when you start the PC
# chkconfig --level 35 vncserver on
--Look for the VNC port stations on you PC
#chkconfig --list vncserver