SPICE协议配置手册-Centos6.6
安装前准备
1、系统环境
Centos 6.6 安装
2、环境配置
2.1、pkg环境配置
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/:/usr/local/share/pkgconfig/:/usr/lib64/pkgconfig/:/usr/lib/pkgconfig
2.2、链接库环境配置
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/:/usr/lib64
安装依赖包
1、gtk+-2.0 安装(2.24.23)
gtk必要组件
yum install gtk2 gtk2-devel gtk2-devel-docs
gtk可选组件
yum install gnome-devel gnome-devel-docs
2、intltool安装(0.41.0-1.1.el6)
yum install intltool.noarch
3、pyparsing 安装(2.0.1)
cd pyparsing-2.0.1
python setup.py install
4、Spice-protocol 安装(0.12.11)
tar -xvf spice_gstream.tar.gz
cd spice_gstream/spice-protocol-0.12.10/
./configure
make
make install
mv /usr/local/share/pkgconfig/spice-protocol.pc /usr/share/pkgconfig/
mv /usr/local/lib/spice-protocol/ /usr/local/share/
pkg-config --modversion spice-protocol
5、Openssl 安装(1.0.1e)
yum install openssl
Yum install openssl-devel.i686 openssl-devel.x86_64 openssl-perl.x86_64
6、gstreamer 安装(0.10.29-1.el6.x86_64)
6.1、Phonon-backend-gstreamer(4.6.2)
yum install phonon-backend-gstreamer.x86_64
6.2、Gstreamer-plugins-bad-free-devel(0.10.19)
yum install gstreamer-plugins-bad-free-devel.x86_64
6.3、Gstreamer-plugins-good-devel(10.23-3.el6.x86_64)
yum install gstreamer-plugins-good-devel.x86_64
6.4、gst-ffmpeg-0.10.11
6.4.1、Orc 安装
cd orc-0.4.24
./configure
make
make install
6.4.2、gst-ffmpeg-0.10.11包含(ffdec_h264)安装
./configure
make
make install
Ffmpeg 插件必须装在gstreamer的目录下面
cp /usr/local/lib/gstreamer-0.10/libgstffmpeg* /usr/lib64/gstreamer-0.10/
7、libjpeg-turbo-devel.x86_64安装(1.2.1-3el6_4)
yum install libjpeg-turbo-devel.x86_64
8、usbredir安装(0.5.1)
8.1、udev安装(147-2.63.el6.x86_64)
8.1.1、yum install udev.x86_64
8.1.2、yum install libudev.x86_64
8.1.3、yum install libudev-devel.x86_64
8.2、libusb-1.0(1.0.9-0.6)
cd libusb-1.0.20/
./configure
make
Makeinstall
如果提示libusb.h找不到:
cp /usr/include/libusb-1.0/libusb.h /usr/include/
8.3、usbredir(0.5.1)
cd usbredir-0.7/
./configure
make
make install
9、liblz4(122)
tar -xvf lz4_0.0~r122.orig.tar.gz
make
make install
10、glib安装
10.1、libffi-3.2.1安装
cd
./configure
make
make install
10.2、Glib安装
./configure
make
make install
11、celt安装
yum install celt051-devel.x86_64
12、cacard安装
12.1、yum install libcacard-devel.x86_64
12.2、yum install libcacard-tools.x86_64
13、sasl安装
13.1、yum install cyrus-sasl.x86_64
13.2、yum install cyrus-sasl-devel.x86_64
14、Pulse安装
yum install pulseaudio-libs-devel.i686
15、Pulsean安装
tar -xvf pulse-mainloop-glib.tar
cd pulse-mainloop-glib
cp usr/lib64/libpulse* /usr/lib64/
cp usr/lib64/pkgconfig/* /usr/lib64/pkgconfig/
如果已经存在,点NO
16、Pygtk 安装
yum install pygtk2-devel.x86_64
17、Polkit
yum install polkit-devel.x86_64
18、Acl安装
yum install libacl-devel.x86_64
19、编译
19.1、编译前spice头文件入库
19.1.1、cd spice-common/
make
make install
19.1.2、cd spice-protocol/
make
make install
19.2、编译代码
./configure0.10 --enable-gst-video=yes --enable-builtin-mjpeg=no --enable-usbredir=yes --enable-lz4=yes --enable-gtk-doc-html=no --with-gtk=2.0 --enable-gtk-doc=no --with-audio=gstreamer
./configure0.10 --enable-gtk-doc-html=no --with-gtk=2.0 --enable-gtk-doc=no
20、启动sever端和client端
20.1、启动server端
/usr/local/bin/qemu-system-x86_64 -name win7_scsi -M pc-i440fx-2.2 -enable-kvm -cpu core2duo -m 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 616f8db1-3672-e013-1a22-b26a0f25003a -nodefconfig -nodefaults -rtc base=localtime,driftfix=slew -no-shutdown -boot menu=off -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -drive file=/var/lib/libvirt/images/win7_scsi.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtio-serial-pci,id=virtio-serial1,bus=pci.0,addr=0x9 -device virtserialport,bus=virtio-serial1.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0 -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1 -device usb-tablet,id=input0 -spice port=5900,addr=0.0.0.0,disable-ticketing,seamless-migration=on,streaming-video=filter -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -msg timestamp=on -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1
20.2、启动client端
Spicy -h 192.168.0.xxx -p 5900
参考文献
1、Client端标准流程:
http://docs.cslabs.clarkson.edu/wiki/SPICE#libspice_and_the_SPICE_client
2、部分安装包下载:
https://www.freedesktop.org/wiki/Software/