VNC SERVER-CentOS
[root@naitinoi ~]# yum -y install vnc-server tigervnc-server
[root@naitinoi ~]# mkdir .vnc
[root@naitinoi ~]# vncpasswd
Password:
Verify:
[root@naitinoi ~]# ee /etc/sysconfig/vncservers
# VNCSERVERS=”2:myusername”
# VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -localhost”
VNCSERVERS=”2:root”
VNCSERVERARGS[2]=”-geometry 800×600″
[root@naitinoi ~]# chkconfig vncserver on
[root@naitinoi ~]# /etc/init.d/vncserver start
Starting VNC server: 2:root xauth: creating new authority file /root/.Xauthority
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/xxxxxx.com:2.log
[ OK ]
allow firewall TCP 5902,6002
[root@naitinoi ~]# iptables -nvL
0 0 ACCEPT tcp — * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:5902
0 0 ACCEPT tcp — * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:6002