Important thing to note about the ports ... 5900 + the display port you set
Please make sure you have installed the GNOME desktop environment in
the CentOS and then follow the below steps to configure the VNC server.
1)
Install VNC Server
root@Server[~]#
yum install vnc-server.
2) Configure VNC Server
* Edit the
/etc/sysconfig/vncservers file and uncomment the following two lines:
VNCSERVERS=”5:root” # display port and username
VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”
VNCSERVERS=”5:root” # display port and username
VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”
* Set password to VNC
Server
root# vncpasswd
root# vncpasswd
3) To start VNC server
root@Server[~]# vncserver
:5
After starting service
file /root/.vnc/xstartup will be created.
* Edit the local config
file in the root folder:
nano ~/.vnc/xstartup
Replace “twm &” with “gnome-session &”
nano ~/.vnc/xstartup
Replace “twm &” with “gnome-session &”
To stop VNC server issue
command
root@Server[~]#vncserver
-kill :5
Client side steps….
To access server remotely
you will need tom install VNC viewer on your local machine. you can
download VNC client.
Once installed, open your
VNC client and type your server’s IP followed by the port
number
*Open your VNC client
(e.g. TightVNC or RealVNC) and type your server’s IP followed
by the port number
e.g.
server’s ip address:5 –> where 5 is the port you set
in
No comments:
Post a Comment