Source code compilation and installation on centos5.2 xen3.2.0

Source: Internet
Author: User
Tags mercurial version control system

Centos5.2 comes with xen3.0.3. Since the source code I compiled is xen3.2.0, We need to compile and install xen3.2.0 on centos5.2. Some problems are found after referring to many installation tutorials on the Internet. So with the help of the Senior Brother, I made a summary after successful installation.

The specific implementation steps are as follows:

1, download mercurial (a lightweight distributed version control system),

Then install: [root @ localhost ~] # Rpm HVI rpmforge-release-0.3.6-1.el5.rf.i386.rpm

[Root @ localhost ~] # Yum install mercurial

2. Download the Linux kernel for xen modification using the downloaded mercurial tool.

Hg clone

This process will take a long time, because the downloaded kernel will have more than 200 MB and will be automatically downloaded to the directory where the terminal is located.

3. Upgrade xen3.0.3-> 3.2.0 through the RPM package (No compilation required) on centos 5.2. The reason for this is that the installation of xen has always failed due to the lack of some components in the source code compilation and installation. Therefore, we want to use the RPM package for automatic installation and install the necessary components, this saves us the effort to find one by one.

Upgrade procedure: (1) modify the yum configuration file [root @ localhost ~] # Vi/etc/yum. conf, set the gpgcheck item to 0

(2) download three RPM packages for xen-3.2.0.i386.rpm, xen-devel-3.2.0.i386.rpm and xen-libs-3.2.0.i386.rpm, download page is:

(3) install these three packages: [root @ localhost ~] # Yum install-y xen-3.2.0.i386.rpm xen-libs-3.2.0.i386.rpm xen-devel-3.2.0.i386.rpm here pay attention to the installation order

If the xen.gz-3.2 file is generated in the bootdirectory, the installation is successful.

(4) modify the grub boot file
[Root @ localhost ~] # Vi/boot/GRUB/grub. conf
Title centos (2.6.18-92. el5xen)
Root (hd0, 5)
Kernel/boot/xen.gz-2.6.18-92. EL5
Module/boot/vmlinuz-2.6.18-92.el5xen Ro root = label =/1 rhgb quiet
The following is the content to be added. Note that in addition to the kernel and title, the other is to copy the existing content in the grub. conf file.

Title centos (2.6.18-92. EL5 & X en 3.2)
Root (hd0, 5)
Module/boot/vmlinuz-2.6.18-92.elxen Ro root = label =/1 rhgb quiet
(5) restart the centos System (2.6.18-92. EL5 & xen 3.2) and run [root @ localhost ~]. # Xm dm view the xen version information. The upgrade is successful!

4, download source code xen3.2.0 package,,

Decompress It To The xen3.2.0 directory and copy the linux-2.6.18-xen.hg folder downloaded in step 2 to the directory.

5. Make & make install: it takes about an hour to start compilation and installation. There are many options for you to choose during this process. I will press enter to select the default option.

6. Create an image. [root @ localhost ~] # Mkinitrd-v-f -- with = aacraid -- with = sd_mod -- with = scsi_mod initrd-, which generates a initrd- file in the directory where the terminal is located, note that you need to copy it to the boot directory, so it is best to CD the terminal to the boot directory before creating the image.

7. Modify the grub boot file

[Root @ localhost ~] # Vi/boot/GRUB/grub. conf

Add the following content:

Title centos (xen-src-3.2src)

Root (hd0, 2) // depends on the boot Partition


Module/boot/vmlinuz- Ro root = label =/rhgb quiet


Restart, OK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.