CentOS 5
Sponsored Link

Install Kernel for OpenVZ2010/04/24

  This section is the virtualization with OpenVZ.
[1] Install Kernel for OpenVZ first and reboot system with it.
[root@ns ~]#
cd /etc/yum.repos.d

[root@ns yum.repos.d]#
wget http://download.openvz.org/openvz.repo

[root@ns yum.repos.d]#
[root@ns ~]#
yum -y install ovzkernel

Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
openvz-kernel-rhel5 100% |=========|  951 B 00:00
openvz-utils 100% |===========|
951 B 00:00

Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
primary.xml.gz 100% |================| 31 kB 00:00
openvz-ker : ###################### 14/14
Added 14 new packages, deleted 0 old in 0.26 seconds
primary.xml.gz 100% |===============| 5.3 kB 00:00
openvz-uti : ########## 21/21
Added 21 new packages, deleted 0 old in 0.13 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for ovzkernel to pack into transaction set.
ovzkernel-2.6.18-8.el5.02 100% |====================| 255 kB 00:00
---> Package Package ovzkernel.i686 0:2.6.18-8.el5.028stab031.1 set to be installed
--> Running transaction check

Dependencies Resolved

==============
Package Arch Version Repository Size
==================
Installing:
ovzkernel i6862.6.18-8.el5.
028stab031.1openvz-kernel
-rhel5 15 M
Transaction Summary
=========================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 15 M
Downloading Packages:
(1/1): ovzkernel-2.6.18-8 100% |===========| 15 MB 00:38
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: ovzkernel############## [1/1]
Installed: ovzkernel.i686 0:2.6.18-8.el5.028stab031.1
Complete!
[root@ns ~]#
[root@ns ~]#
vi /etc/sysctl.conf


# line 7: change

net.ipv4.ip_forward =
1


# line 16: change

kernel.sysrq =
1


# add at the bottom

net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0


[root@ns ~]#
vi /boot/grub/grub.conf


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
#
all kernel and initrd paths are relative to /boot/, eg.

#
root (hd0,0)

#
kernel /vmlinuz-version ro root=/dev/Host/LogVol01

#
initrd /initrd-version.img

#boot=/dev/sda
# change default kernel

default=
0

timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-8.el5.028stab031.1)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5.028stab031.1 ro root=/dev/VZ/Host00 console=tty0
initrd /initrd-2.6.18-8.el5.028stab031.1.img
title CentOS (2.6.18-8.1.4.el5xen)
root (hd0,0)
kernel
/xen.gz-2.6.18-8.1.4.el5 dom0_mem=512M

module /vmlinuz-2.6.18-8.1.4.el5xen ro root=/dev/Xen/Host00
module /initrd-2.6.18-8.1.4.el5xen.img
title CentOS (2.6.18-8.1.1.el5)
root (hd0,0)
kernel
/vmlinuz-2.6.18-8.1.1.el5 ro root=/dev/Xen/Host00

initrd
/initrd-2.6.18-8.1.1.el5.img

title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel
/vmlinuz-2.6.18-8.el5 ro root=/dev/Xen/Host00

initrd
/initrd-2.6.18-8.el5.img


[root@ns ~]#
shutdown -r now


[root@ns ~]#
2.6.18-8.el5.028stab031.1
# OpenVZ kernel
Matched Content