step 1 : install with following config
yum install tigervnc
yum install tigervnc-server
step2 config
修改配置文件:vim /etc/sysconfig/vncservers
VNCSERVERS="1:root " // 1 代表session 号,root的位置写用户名
VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp
-localhost" [1] 代表配置的是那个session ,800x600代表是分辨率 ,-localhost 要去掉才可以接受远端连接
step3 disable firewall
step4 active VNC
vncserver
other
/etc/init.d/vncserver restart
vncserver -kill :1 杀掉session 1
连接
VNC的默认端口是5900,而远程桌面连接端口则是5900+n(n是vncserver命令指定的)。如果使用“vncserver :1”命令启动VNC Server,那么下面的端口应该是5901