1.安装kvm
Sugon10:~ # zypper in qemu-kvm.x86_64 (qemu-kvm-tools.x86_64后期删除)
2.安装libvirt
Sugon10:~ # zypper install libvirt.x86_64 libvirt-cim.x86_64 libvirt-client.x86_64 (libvirt-java.norach后期删除) libvirt-python.x86_64
3.安装virsh-manager
Sugon10:~ # zypper in virt-manager
4.安装vnc
a)(这个方法安装后/etc/sysconfig/下没有相应配置文件)
先到http://www.realvnc.com/download/vnc/latest/下载对应的tar.gz文件包
解压Sugon10:~ # tar zxvf VNC-5.3.0-Linux-x86-ANY.tar.gz
将它安装到/usr/local/bin下
Sugon10:~/VNC-5.3.0-Linux-x86 # ./vncinstall /usr/local/bin
b)
下载vnc-server-4.1.2-14.el5_5.4.i386.rpm
然后安装
需要安装两个rpm,我用的是suse的zypper
zypper in vnc-4.1.2-14.el5_6.6.i386.rpm
zypper in vnc-server-4.1.2-14.el5_5.4.i386.rpm
配置:
#vi /etc/sysconfig/vncservers --添加以下几行,保存并退出
设置3个用户:root, cheny, yesd
VNCSERVERS="1:root" (以下设置分辨率 可以不加 系统默认)
VNCSERVERARGS[1]="-geometry 1024x768 –alwaysshared -depth 16"
补充:
Sugon10:/etc # vnclicense -add K7234-N4NQP-2EE72-R4ECH-K3VVALicense key <Free> has been successfully applied.
Sugon10:/etc # vncserver
VNC(R) Server 5.3.0 (r15303) x86 (Dec 7 2015 10:31:11)
Copyright (C) 2002-2015 RealVNC Ltd.
RealVNC and VNC are trademarks of RealVNC Ltd and are protected by trademark
registrations and/or pending trademark applications in the European Union,
United States of America and other jurisdictions.
Protected by UK patent 2481870; US patent 8760366.
See http://www.realvnc.com for information on VNC.
For third party acknowledgements see:
http://www.realvnc.com/products/vnc/documentation/5.3/acknowledgements.txt
You must specify a password for VNC authentication.
Setting "Password" VNC parameter for Virtual Mode server
Password:
Verify:
Successfully set "Password" VNC parameter in /root/.vnc/config.d/Xvnc
If a desktop environment fails to load for this virtual desktop, please see:
http://www.realvnc.com/doclink/kb-345?version=5.3.0.15303
Running applications in /root/.vnc/xstartup
VNC Server catchphrase: "Music stand sonar. Verbal relax Vatican."
signature: a9-17-ba-a3-1e-ed-90-76
Log file is /root/.vnc/Sugon10:1.log
New desktop is Sugon10:1 (172.16.15.10:1)
Sugon10:/etc #
首先确认你服务器是否配置了VNCSERVER,可以在命令行下敲入以下命令查看:
[root@localhost: ~]#rpm -qa |grep vnc
vnc-server-4.1.2-14.el5
xauth:(stdin):1:bad display name "xxx:1" in "add" command解决
http://blog.csdn.net/u011350541/article/details/50586725
Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
先:.安装libvirt
Sugon10:~ # zypper install libvirt.x86_64 libvirt-cim.x86_64 libvirt-client.x86_64 libvirt-java.norach libvirt-python.x86_64
然后:service libvirtd restart就OK了