Redhat Enterprise Linux 6.4 64bit
RHEL 6.4 发布光盘(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,比较难看
为了达到好的颜色效果,还需要把adapt to network speed去掉,并且把quality提高(需要更高的网速,如果网速太低,响应太慢,请不要这么做)
有两个用户root和bmc, 注意bmc要是真实存在的linux用户用root用户登录, 运行 vncpasswd为其创建密码su - bmc, 运行vncpasswd为bmc创建密码
以root用户运行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密码即可
查看已经存在的服务:
[root@adi ~]# vncserver -list
TigerVNC server sessions:
X DISPLAY#PROCESS ID
:13377关闭服务:[root@adi ~]# vncserver -kill :1
Killing Xvnc process ID 3377
有问题时可以试试清理vnc配置目录rm ~/.vnc/ -rf查看运行的进程# ps -ef | grep Xvnc