Redhat Enterprise Linux 6.4 64bit
RHEL 6.4 發(fā)布光盤(ISO)里面自帶tigervnc-server:
[root@adi ~]# yum install tigervnc-server下載 vnc viewer:http://www.realvnc.com/download/get/1382/
# vi /etc/sysconfig/vncservers
VNCSERVERS="1:root 2:bmc"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"#顏色深度16位,缺省為8,比較難看
為了達(dá)到好的顏色效果,還需要把a(bǔ)dapt to network speed去掉,并且把quality提高(需要更高的網(wǎng)速,如果網(wǎng)速太低,響應(yīng)太慢,請不要這么做)
有兩個用戶root和bmc, 注意bmc要是真實存在的linux用戶用root用戶登錄, 運(yùn)行 vncpasswd為其創(chuàng)建密碼su - bmc, 運(yùn)行vncpasswd為bmc創(chuàng)建密碼
以root用戶運(yùn)行vncserver:[root@adi ~]# vncserver
xauth: (stdin):1: bad display name "adi:1" in"add" command
New 'adi:1 (root)' desktop is adi:1
Creating default star tup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/adi:1.log
因為root用戶是/etc/sysconfig/vncservers里面的第一個用戶,所以其缺省端口為5901。同樣,第2個bmc用戶的端口是5902。
下面對話框輸入root用戶的vnc密碼即可
查看已經(jīng)存在的服務(wù):
[root@adi ~]# vncserver -list
TigerVNC server sessions:
X DISPLAY#PROCESS ID

:13377關(guān)閉服務(wù):[root@adi ~]# vncserver -kill :1
Killing Xvnc process ID 3377
有問題時可以試試清理vnc配置目錄rm ~/.vnc/ -rf查看運(yùn)行的進(jìn)程# ps -ef | grep Xvnc
愛華網(wǎng)
