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), ftp://ftp.univie.ac.at/systems/linux/dag/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
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 http://xenbits.xensource.com/linux-2.6.18-xen.hg
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: http://www.xen.org/download/dl_32rhel5.html
(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
Module/boot/initrd-2.6.18-92.el5xen.img
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)
Kernel/boot/xen.gz-3.2
Module/boot/vmlinuz-2.6.18-92.elxen Ro root = label =/1 rhgb quiet
Module/boot/initrd-2.6.18-92.el5xen.img
(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, http://bits.xensource.com/oss-xen/release/3.2.0/xen-3.2.0.tar.gz,
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-2.6.18.8-xen.img 2.6.18.8-xen, which generates a initrd-2.6.18.8-xen.img 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
Kernel/boot/xen-3.2.0.gz
Module/boot/vmlinuz-2.6.18.8-xen Ro root = label =/rhgb quiet
Module/boot/initrd-2.6.18.8-xen.img
Restart, OK