下载源码
1.wget https://www.spice-space.org/download/releases/spice-protocol-0.12.13.tar.bz2
2.wget https://www.spice-space.org/download/releases/spice-0.14.0.tar.bz2
3.wget https://download.qemu.org/qemu-2.10.2.tar.xz
下载完后解压各个源码包,tar -jxvfspice-protocol-0.12.13.tar.bz2,tar -jxvfspice-0.14.0.tar.bz2,tar -Jxvf qemu-2.10.2.tar.xz
编译安装
编译安装spice-protocol
编译安装spice-0.14.0
yum install -y celt051-devel.x86_64
yum install -y openssl-devel.x86_64
yum install libjpeg-turbo-devel.x86_64
yum install gtk2-devel.x86_64
2.配置安装spice,在spice-0.14.0目录下创建build目录,进入build目录,../configure PKG_CONFIG_PATH=/usr/local/share/,这边未配置其他选项,使用默认配置,配置无错误后,进行make && make install
编译安装qemu-kvm
总结
至此,基于spice的qemu-kvm已经编译安装好了,这边比较重要的是缺少什么依赖库就yum install安装,其库名可以根据yum list | grep xx过滤一下,一般安装xx.devel.xx的库即可,另外对于源码安装的要记得使用PKG_CONFIG_PATH环境变量告知要在哪个路径下查找对应的库。