官方安装文档:http://xen.crc.id.au/support/guides/install/

一、环境说明

1. 本文采用CentOS6.5 x64,安装开发包及开发工具。

centos6.5Xen4.2安装-LMLPHP

2. 关闭selinux

centos6.5Xen4.2安装-LMLPHP

XenServer如何添加本地存储 http://www.linuxidc.com/Linux/2013-06/86433.htm

开启并配置Citrix XenServer的SNMP服务 http://www.linuxidc.com/Linux/2013-01/78487.htm

CentOS/Linux安装 XS-Tools (XenServer) http://www.linuxidc.com/Linux/2012-10/71607.htm

XenServer教程:XenCneter实现热迁移步骤 http://www.linuxidc.com/Linux/2012-10/71606.htm

二、开始安装

1. 安装bridge-utils package

[root@xen ~]# yum install bridge-utils 
Loaded plugins: fastestmirror, refresh-packagekit, security 
Determining fastest mirrors 
epel/metalink | 5.4 kB 00:00 
* base: centos.ustc.edu.cn 
* epel: mirror01.idc.hinet.net 
* extras: centos.ustc.edu.cn 
* updates: centos.ustc.edu.cn 
base | 3.7 kB 00:00 
epel | 4.4 kB 00:00 
epel/primary_db | 6.2 MB 01:07 
extras | 3.4 kB 00:00 
updates | 3.4 kB 00:00 
updates/primary_db | 3.7 MB 00:09 
Setting up Install Process 
Package bridge-utils-1.2-10.el6.x86_64 already installed and latest version 
Nothing to do

2. 安装crc.id.au安装源

[root@xen ~]# yum install http://au1.mirror.crc.id.au/repo/kernel-xen-release-6-5.noarch.rpm 
Loaded plugins: fastestmirror, refresh-packagekit, security 
Loading mirror speeds from cached hostfile 
* base: centos.ustc.edu.cn 
* epel: mirror01.idc.hinet.net 
* extras: centos.ustc.edu.cn 
* updates: centos.ustc.edu.cn 
Setting up Install Process 
kernel-xen-release-6-5.noarch.rpm | 10 kB 00:00 
Examining /var/tmp/yum-root-myODPk/kernel-xen-release-6-5.noarch.rpm: kernel-xen-release-6-5.noarch 
Marking /var/tmp/yum-root-myODPk/kernel-xen-release-6-5.noarch.rpm to be installed 
Resolving Dependencies 
--> Running transaction check 
---> Package kernel-xen-release.noarch 0:6-5 will be installed 
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================ 
Package Arch Version Repository Size 
================================================================================================================================================================================ 
Installing: 
kernel-xen-release noarch 6-5 /kernel-xen-release-6-5.noarch 3.5 k

Transaction Summary 
================================================================================================================================================================================ 
Install 1 Package(s)

Total size: 3.5 k 
Installed size: 3.5 k 
Is this ok [y/N]: y 
Downloading Packages: 
Running rpm_check_debug 
Running Transaction Test 
Transaction Test Succeeded 
Running Transaction 
Installing : kernel-xen-release-6-5.noarch 1/1 
Verifying : kernel-xen-release-6-5.noarch 1/1

Installed: 
kernel-xen-release.noarch 0:6-5

Complete! 
[root@xen ~]#

3. 安装xen虚拟化

[root@xen ~]# yum install xen 
Loaded plugins: fastestmirror, refresh-packagekit, security 
Loading mirror speeds from cached hostfile 
* base: centos.ustc.edu.cn 
* epel: mirror01.idc.hinet.net 
* extras: centos.ustc.edu.cn 
* kernel-xen: au1.mirror.crc.id.au 
* updates: centos.ustc.edu.cn 
kernel-xen | 2.9 kB 00:00 
kernel-xen/primary_db | 66 kB 00:00 
Setting up Install Process 
Resolving Dependencies 
--> Running transaction check 
---> Package xen.x86_64 0:4.2.4-4.el6 will be installed 
base/filelists_db | 5.9 MB 00:14 
epel/filelists_db | 8.7 MB 00:20 
extras/filelists_db | 11 kB 00:00 
kernel-xen/filelists_db | 821 kB 00:07 
updates/filelists_db | 2.2 MB 00:03 
--> Processing Dependency: xen-runtime = 4.2.4-4.el6 for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: xen-licenses = 4.2.4-4.el6 for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: xen-libs = 4.2.4-4.el6 for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: xen-hypervisor = 4.2.4-4.el6 for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: xen-doc = 4.2.4-4.el6 for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: yajl for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: libxenstore.so.3.0()(64bit) for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: libxenguest.so.4.2()(64bit) for package: xen-4.2.4-4.el6.x86_64 
--> Processing Dependency: libxenctrl.so.4.2()(64bit) for package: xen-4.2.4-4.el6.x86_64 
--> Running transaction check 
---> Package xen-doc.x86_64 0:4.2.4-4.el6 will be installed 
---> Package xen-hypervisor.x86_64 0:4.2.4-4.el6 will be installed 
--> Processing Dependency: qemu-img for package: xen-hypervisor-4.2.4-4.el6.x86_64 
---> Package xen-libs.x86_64 0:4.2.4-4.el6 will be installed 
---> Package xen-licenses.x86_64 0:4.2.4-4.el6 will be installed 
---> Package xen-runtime.x86_64 0:4.2.4-4.el6 will be installed 
---> Package yajl.x86_64 0:1.0.7-3.el6 will be installed 
--> Running transaction check 
---> Package qemu-img.x86_64 2:0.12.1.2-2.415.el6_5.10 will be installed 
--> Processing Dependency: libusbredirparser.so.1()(64bit) for package: 2:qemu-img-0.12.1.2-2.415.el6_5.10.x86_64 
--> Processing Dependency: libgfxdr.so.0()(64bit) for package: 2:qemu-img-0.12.1.2-2.415.el6_5.10.x86_64 
--> Processing Dependency: libgfrpc.so.0()(64bit) for package: 2:qemu-img-0.12.1.2-2.415.el6_5.10.x86_64 
--> Processing Dependency: libgfapi.so.0()(64bit) for package: 2:qemu-img-0.12.1.2-2.415.el6_5.10.x86_64 
--> Running transaction check 
---> Package glusterfs-api.x86_64 0:3.4.0.57rhs-1.el6_5 will be installed 
---> Package glusterfs-libs.x86_64 0:3.4.0.57rhs-1.el6_5 will be installed 
---> Package usbredir.x86_64 0:0.5.1-1.el6 will be installed 
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================ 
Package Arch Version Repository Size 
================================================================================================================================================================================ 
Installing: 
xen x86_64 4.2.4-4.el6 kernel-xen 1.0 M 
Installing for dependencies: 
glusterfs-api x86_64 3.4.0.57rhs-1.el6_5 updates 55 k 
glusterfs-libs x86_64 3.4.0.57rhs-1.el6_5 updates 240 k 
qemu-img x86_64 2:0.12.1.2-2.415.el6_5.10 updates 596 k 
usbredir x86_64 0.5.1-1.el6 base 40 k 
xen-doc x86_64 4.2.4-4.el6 kernel-xen 989 k 
xen-hypervisor x86_64 4.2.4-4.el6 kernel-xen 4.4 M 
xen-libs x86_64 4.2.4-4.el6 kernel-xen 352 k 
xen-licenses x86_64 4.2.4-4.el6 kernel-xen 52 k 
xen-runtime x86_64 4.2.4-4.el6 kernel-xen 5.8 M 
yajl x86_64 1.0.7-3.el6 base 27 k

Transaction Summary 
================================================================================================================================================================================ 
Install 11 Package(s)

Total download size: 13 M 
Installed size: 33 M 
Is this ok [y/N]: y 
Downloading Packages: 
(1/11): glusterfs-api-3.4.0.57rhs-1.el6_5.x86_64.rpm | 55 kB 00:00 
(2/11): glusterfs-libs-3.4.0.57rhs-1.el6_5.x86_64.rpm | 240 kB 00:01 
(3/11): qemu-img-0.12.1.2-2.415.el6_5.10.x86_64.rpm | 596 kB 00:03 
(4/11): usbredir-0.5.1-1.el6.x86_64.rpm | 40 kB 00:00 
(5/11): xen-4.2.4-4.el6.x86_64.rpm | 1.0 MB 00:06 
(6/11): xen-doc-4.2.4-4.el6.x86_64.rpm | 989 kB 00:05 
(7/11): xen-hypervisor-4.2.4-4.el6.x86_64.rpm | 4.4 MB 00:17 
(8/11): xen-libs-4.2.4-4.el6.x86_64.rpm | 352 kB 00:02 
(9/11): xen-licenses-4.2.4-4.el6.x86_64.rpm | 52 kB 00:01 
(10/11): xen-runtime-4.2.4-4.el6.x86_64.rpm | 5.8 MB 00:50 
(11/11): yajl-1.0.7-3.el6.x86_64.rpm | 27 kB 00:00 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
Total 122 kB/s | 13 MB 01:52 
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 5838f88d: NOKEY 
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kernel-xen 
Importing GPG key 0x5838F88D: 
Userid : Steven Haigh <[email protected]
Package: kernel-xen-release-6-5.noarch (@/kernel-xen-release-6-5.noarch) 
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-kernel-xen 
Is this ok [y/N]: y 
Retrieving key from http://www.crc.id.au/repo/RPM-GPG-KEY-kernel-xen 
Running rpm_check_debug 
Running Transaction Test 
Transaction Test Succeeded 
Running Transaction 
Installing : yajl-1.0.7-3.el6.x86_64 1/11 
Installing : glusterfs-libs-3.4.0.57rhs-1.el6_5.x86_64 2/11 
Installing : glusterfs-api-3.4.0.57rhs-1.el6_5.x86_64 3/11 
Installing : usbredir-0.5.1-1.el6.x86_64 4/11 
Installing : 2:qemu-img-0.12.1.2-2.415.el6_5.10.x86_64 5/11 
Installing : xen-hypervisor-4.2.4-4.el6.x86_64 6/11 
Installing : xen-doc-4.2.4-4.el6.x86_64 7/11 
Installing : xen-4.2.4-4.el6.x86_64 8/11 
在 xen-watchdog 服务中读取信息时出错:没有那个文件或目录 
Installing : xen-licenses-4.2.4-4.el6.x86_64 9/11 
Installing : xen-libs-4.2.4-4.el6.x86_64 10/11 
Installing : xen-runtime-4.2.4-4.el6.x86_64 11/11 
Verifying : xen-licenses-4.2.4-4.el6.x86_64 1/11 
Verifying : 2:qemu-img-0.12.1.2-2.415.el6_5.10.x86_64 2/11 
Verifying : xen-4.2.4-4.el6.x86_64 3/11 
Verifying : xen-hypervisor-4.2.4-4.el6.x86_64 4/11 
Verifying : glusterfs-libs-3.4.0.57rhs-1.el6_5.x86_64 5/11 
Verifying : yajl-1.0.7-3.el6.x86_64 6/11 
Verifying : glusterfs-api-3.4.0.57rhs-1.el6_5.x86_64 7/11 
Verifying : xen-runtime-4.2.4-4.el6.x86_64 8/11 
Verifying : xen-doc-4.2.4-4.el6.x86_64 9/11 
Verifying : xen-libs-4.2.4-4.el6.x86_64 10/11 
Verifying : usbredir-0.5.1-1.el6.x86_64 11/11

Installed: 
xen.x86_64 0:4.2.4-4.el6

Dependency Installed: 
glusterfs-api.x86_64 0:3.4.0.57rhs-1.el6_5 glusterfs-libs.x86_64 0:3.4.0.57rhs-1.el6_5 qemu-img.x86_64 2:0.12.1.2-2.415.el6_5.10 usbredir.x86_64 0:0.5.1-1.el6 
xen-doc.x86_64 0:4.2.4-4.el6 xen-hypervisor.x86_64 0:4.2.4-4.el6 xen-libs.x86_64 0:4.2.4-4.el6 xen-licenses.x86_64 0:4.2.4-4.el6 
xen-runtime.x86_64 0:4.2.4-4.el6 yajl.x86_64 0:1.0.7-3.el6

Complete! 
[root@xen ~]#

查看安装

[root@xen ~]# ls -l /boot/xen.gz 
lrwxrwxrwx 1 root root 12 8月 5 10:13 /boot/xen.gz -> xen-4.2.4.gz 
[root@xen ~]# 
[root@xen ~]#

更多详情见请继续阅读下一页的精彩内容: http://www.linuxidc.com/Linux/2014-08/105554p2.htm

04-15 05:41