R-Ts NetWorks

Server the Best

How to install OpenVZ Kernel in Linux Server


How to install OpenVZ Kernel in Linux Server

In order to install OpenVZ, we need to add the OpenVZ repository to yum:
 
cd /etc/yum.repos.d
 
wget http://download.openvz.org/openvz.repo
 
rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ
 
 
Now open openvz.repo.
vi openvz.repo
and disable the [openvz-kernel-rhel6] repository (enabled=0) and enable the [openvz-kernel-rhel5] repository instead (enabled=1):
 
yum search ovzkernel
yum list ovzkernel*
yum install ovzkernel*
Open grub.conf and check Openvz kernel is set to default or not. You can check the default value as per Openvz kernel. But by default it will automatically take Openvz at the top of the grub.conf means at the 0th position.
vi /etc/grub.conf
default=0
save the file and quit.
 
Now go to grub prompt by using the below command:
[root@server~]# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub>
Now fire the below command on grub prompt to reboot the server using the openvz kernel once.
savedefault – -default=0 – -once
Now, reboot the server.
shutdown -rf now 
 
I want to use CentOS 5 in my virtual machines, so I download a CentOS 5 template:
 
 
restart vz service on the server using the below command:
/etc/init.d/vz restart
 
IP forwarding is not enabled                               [WARNING]
 
If you are getting above warning message then follow the below steps:
vi /etc/sysctl.conf
# Controls IP packet forwarding
net.ipv4.ip_forward = 0     —-> make it 1
save and quit the file
 
Please use the below commands to install vzctl and vzquota commands on the server
yum install vzctl vzquota
 
Advertisements

May 7, 2012 - Posted by | CPanel / WHM, Installation | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: