一.安裝
[root@demo ~]# yum install tigervnc-server
[root@demo ~]# yum install -y tigervnc*
二.設置密碼
[root@demo ~]# vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth: creating new authority file /root/.Xauthority
New 'demo:1 (root)' desktop is demo:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/demo:1.log
三.編輯配置文件
[root@demo ~]# vim ~/.vnc/xstartup
[root@demo ~]# vim /etc/sysconfig/vncservers
四.啓動
[root@demo ~]# service vncserver restart
關閉 VNC 服務器:1:root [確定]
正在啓動 VNC 服務器:1:root xauth: (stdin):1: bad display name "demo:1" in "add" command
New 'demo:1 (root)' desktop is demo:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/demo:1.log
[確定]
連接我的服務器
安裝配置VNC過程中我遇到了問題如下:
VNC啓動時報“A VNC server is already running as :1”,是什麼問題?
答:說明已經有用戶啓動了vnc服務,你可以ps aux|grep vnc查看是否有vnc的進程,如果有表示有人正在:1桌面上啓用來vnc服務,如果沒有,說明上一次啓用到vnc服務沒有正常退出,可以刪除/tmp/.X11-unix下的X1,並重啓VNC服務。
在Linux服務器上啓動VNC服務正常,但是客戶端無法連接報10061超時是什麼問題?
答:應該是Linux服務器防火牆的設置問題,請檢查防火牆的設置規則。
引用在Linux系統中安裝和使用VNC http://7056824.blog.51cto.com/69854/132836