centos源码安装Xen

CentOS 6.4 Compiling Xen

一、准备(Prepare)

需要准备以下文件:
CentOS 6.4-x86_64(安装centos系统)
xen-4.1.2(xen内核源码文件)
linux-3.0.94(linux内核文件)
blktap2-3.0.patch(linux 内核补丁for xen,下载地址:ftp://ftp.enjellic.com/pub/xen/blktap2-3.0.patch)

安装CentOS的步骤此处略过。。。

二、安装

1.关闭SELinux(Disable SELinux)
# vim /etc/selinux/config
chage to SELINUX=disabled
# reboot

2.安装必要的库和软件(Pre-Requirements)

# yum groupinstall "Development tools" "Additional Development" "Debugging Tools" "System administration tools" "Compatibility libraries" "Console internet tools"

# yum install transfig wget texi2html libaio-devel dev86 glibc-devel e2fsprogs-devel gitk mkinitrd iasl xz-devel bzip2-devel pciutils-libs pciutils-devel SDL-devel libX11-devel gtk2-devel bridge-utils PyXML qemu-common qemu-img mercurial texinfo libuuid-devel

# yum install glibc-devel.i686

3.给linux内核打补丁(Patch blktap to kernel)
# cd /path/to/kernel
# patch -p1 < /path/to/patch

4.编译Dom0内核,这里我们用的是Linux(Compile the Dom0 kernel)
# cd path/to/kernel
# make clean
# make mrproper
# make menuconfig (also # vim .config)

下面是需要配置的项,其他项采用默认即可:

Device Drivers --->
[ * ] Block devices --->
<*> Block-device backend driver
Device Drivers --->
-*- Network device support --->
<*> Xen backend network device

Device Drivers --->
XEN driver support --->
[ * ] Xen memory balloon driver
[ * ] Scrub pages before returning them to system
<*> Xen /dev/xen/evtchn device
[ * ] Backend driver support
<*> Xen filesystem
[ * ] Create compatibility mount point /proc/xen
[ * ] Create xen entries under /sys/hypervisor
<*> userspace grant access device driver

General Setup --->
[ * ] Enable deprecated sysfs features to support old userspace tools
[ * ] Enable deprecated sysfs features by default

Device Drivers --->
[ * ] Block devices --->
<*> Blktap userspace devices

# make -j4
# make -j4 modules
# make -j4 modules_install
# make -j4 install

5.编译Xen内核(Compile Xen kernel)
# cd /xen/path
# make world
# make install

6.修改启动项(Configure grub configure)
# vim /etc/grub.conf
Like this:
title CentOS 3.0.94
root (hd0,0)
kernel /....
initrd /....
copy above four lines to before,like this:
title CentOS 3.0.94xen
root (hd0,0)
kernel /boot/xen-4.1.2.gz ( kernel /xen-4.1.2.gz, 看情况而定)
module /...
module /...

Add Xen to start configure:
# /sbin/chkconfig --add xend
# /sbin/chkconfig --add xencommons
# /sbin/chkconfig --add xendomains
# /sbin/chkconfig xend on
# /sbin/chkconfig xendomains on
# /sbin/chkconfig xencommons on

7.到这里安装完成,重启!

时间: 2024-10-06 04:40:21

centos源码安装Xen的相关文章

CentOS 源码安装 zabbix3.4

环境: CentOS: 6.9 IP:192.168.1.92 JDK:1.7.0.45 ngingx: 1.13.6 mysql:  5.7.21-linux-glibc2.5-x86_64 php:    5.6.31 zabbix: 3.4.2 源码包存放路径:/data/tools/ 安装路径:      /usr/local/ 1.关闭防火墙和selinux 1.1. 关闭iptables ]# service iptables stop iptables: Setting chain

CentOS 源码安装MySQL5.7

一.安装方式源码安装,源码包名称mysql-boost-5.7.27.tar.gz,此版本包含boost库,在解压后的boost路径下.安装时,可以-DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/mysql-5.7.27/boost/指定boost路径 二.安装路径基础路径 /usr/local/mysql数据文件路径 /usr/local/mysql/data 三.安装依赖yum -y install autoconf automake libtool c

CentOS源码安装nagios与nagios-plugin

CentOSx64 源码安装nagios与nagios-plugin 官方网址:http://www.nagios.org 一.安装指导: http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html 二.nagios的配置 1)修改/usr/local/nagios/etc/nagios.cnf 文件修改如下: #cfg_file=/usr/local/nagios/etc/objects/windows.cfg cfg_file=

linux(centos)源码安装git

最近使用一个开源库,部署的的时候需要用git克隆依赖库.刚好系统没安装git.就尝试了源码安装git. 源码下载地址:http://codemonkey.org.uk/projects/git-snapshots/git/ 找了个最新版本的下载,我下载的是:git-latest.tar.xz 这个后缀的文件在我的linux系统不能解压.不想再安装相应的解压工具了.就机智地放在window下用winrar解压了. 上传到linux.修改git源码文件权限:chmod -R 755 git-2015

CentOS源码安装 Tomcat/8.0.24

依个人的习惯,喜欢将源码安装在/usr/local这个目录下面: 第一步:下载源码 wget http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz 第二步:解压源码: tar -zxvf apache-tomcat-8.0.24.tar.gz mv apache-tomcat-8.0.24 /usr/local/tomcat 第三步:启动tomcat cd /usr/local

CentOS源码安装GitLab汉化版

示例环境: 软件 版本 CentOS 6.5 x86_64 Git 2.6.2 Ruby 2.2.3 Node.js 4.2.1 Redis 3.0.5 MariaDB 10.0.21 GitLab 8.0.5汉化版 GitLab Shell 2.6.6 Nginx 1.8.0 Go 1.5.1 Gitlab-git-http-server 0.2.14 一.修改Yum源为阿里云提高下载速度 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.

centos 源码安装php5.5

系统环境: CentOS 6.5 / 7.0 x86_64 Fedora 20 x86_64下载 PHP 源码包 # wget http://cn2.php.net/distributions/php-5.5.15.tar.bz2# tar xf php-5.5.15.tar.bz2 -C /usr/local/src/ 添加 epel 源 # rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noar

CentOS源码安装GitLab汉化版第2版

软件版本: CentOS 7.2 Git 2.12.0 Ruby 2.3.3 Node.js 6.10.1 Redis 3.2.8 MariaDB 10.1.20 GitLab 8.8.5汉化版 GitLab Shell 2.7.2 Nginx 1.10.3 Go 1.8 GitLab-Workhorse 0.7.1 一.安装依赖 yum -y install libicu-devel patch gcc-c++ readline-devel zlib-devel libffi-devel op

CentOS源码安装搭建LNMP全过程(包括nginx,mysql,php,svn)

服务器环境为:CentOS6.5 64位 目标:搭建LNMP(Linux + Nginx + MySQL + PHP +SVN),其中svn是用来代替ftp,方便开发中调试同步代码 相关目录:所有软件都安装到/www/目录下,在www目录下新建web文件夹作为网站的根路径,www目录下新建wwwsvn作为svn的仓库地址./www/software用来放nginx,mysql,php的安装包和源码.nginx运行分组和账户www:www 一,安装前的准备 yum -y install ntp m