Difference between revisions of "Installation on Debian/old"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
m (add the test-18 to (dso-)repro)
(Etch)
Line 66: Line 66:
  
  
=Unstable=
+
=Etch (testing)=
  
OpenVZ is now a part of Debian Sid (a.k.a. "unstable") repository. This article describes how to install OpenVZ on a Debian Sid system.
+
OpenVZ is now a part of Debian Etch (a.k.a. "testing") repository. This article describes how to install OpenVZ on a Debian Etch system.
  
 
== Installing the utilities and kernel patch ==
 
== Installing the utilities and kernel patch ==
  
To install the OpenVZ kernel patch and utilities, run the following:
+
To install the kernel-source, OpenVZ kernel patch and utilities, run the following:
 
<pre>
 
<pre>
 
apt-get update
 
apt-get update
apt-get install kernel-patch-openvz vzctl vzquota
+
apt-get install linux-source-2.6.18 kernel-patch-openvz vzctl vzquota
 
</pre>
 
</pre>
  
 
== Creating the kernel package ==
 
== Creating the kernel package ==
  
To create a kernel package, you need to download and unpack 2.6.16 “vanilla” kernel first:
+
First you need to unpack the kernel:
 +
 
 
<pre>
 
<pre>
cd /usr/src/
+
cd /usr/src
wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.tar.bz2
+
tar xjf linux-source-2.6.18
tar xjf linux-2.6.16.tar.bz2
+
cd linux-source-2.6.18
cd linux-2.6.16
 
 
</pre>
 
</pre>
  
(Note that you do need a vanilla kernel for this, because the OpenVZ kernel patch doesn't apply cleanly to the Debian linux-source-2.6.16 package; see [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=377707 Debian bug #377707].)
+
Next, you need to get a kernel config. You can use the config of the debian-kernel:
 +
 
 +
<pre>
 +
cp /boot/config-2.6.18-3-686 .config
 +
</pre>
  
Next, get the proper kernel config from [http://download.openvz.org/kernel/devel/026test015.1/configs/ download.openvz.org]. Below is the example of using smp config for i686:
+
Now you can apply openvz kernel patch and compile the kernel:
  
 
<pre>
 
<pre>
wget http://download.openvz.org/kernel/devel/026test015.1/configs/kernel-2.6.16-026test015-i686-smp.config.ovz
+
make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 kernel_image
mv kernel-2.6.16-026test015-i686-smp.config.ovz .config
 
 
</pre>
 
</pre>
  
{{Note|This example uses a config file for the 026test015 kernel patch. If the kernel-patch-openvz package you installed is a different version, download a config file that corresponds with your version}}
+
Install the kernel and update initramfs:
 
 
Now you can apply openvz kernel patch and compile the kernel:
 
  
 
<pre>
 
<pre>
make-kpkg --added_patches openvz
+
cd ..
 +
dpkg -i linux-image-2.6.18-1-openvz_1_i386.deb
 +
update-initramfs -c -k 2.6.18-1-openvz
 +
update-grub
 
</pre>
 
</pre>
 +
 +
Just reboot into your new openvz-kernel.
  
 
[[Category: HOWTO]]
 
[[Category: HOWTO]]
 
[[Category: Installation]]
 
[[Category: Installation]]

Revision as of 17:05, 17 December 2006

Stable

Edit apt settings

add to your "/etc/apt/sources.list"

 deb http://debian.systs.org/ stable openvz

and get the new package lists

# apt-get update

Packages at debian.systs.org (dso)

precreated OpenVZ Debian Packages:

kernel(s) for i368 and amd64

 ovzkernel-2.6.9      
 ovzkernel-2.6.9-smp

 ovzkernel-2.6.16      
 ovzkernel-2.6.16-smp

 ovzkernel-2.6.18      
 ovzkernel-2.6.18-smp

i386 only:

 ovzkernel-2.6.18-enterprise    

OpenVZ tool(s) for i386 and amd64

 vzctl
 vzquota
 vzprocps

template(s) for i368 and amd64 : Debian 3.1 Minimal

 vzctl-ostmpl-debian

Installing the kernels and OpenVZ toolset

Example: install the stable OpenVZ kernel, tools and debian OS Template

# aptitude install ovzkernel-2.6.9 vzctl vzquota vzctl-ostmpl-debian

Maybe you need to update you "linux-loader" like lilo or grub:

for the "GRUB":

# /sbin/grub-update

Reboot in your new Debian Stable OpenVZ System

# reboot

That's all :-)


Etch (testing)

OpenVZ is now a part of Debian Etch (a.k.a. "testing") repository. This article describes how to install OpenVZ on a Debian Etch system.

Installing the utilities and kernel patch

To install the kernel-source, OpenVZ kernel patch and utilities, run the following:

apt-get update
apt-get install linux-source-2.6.18 kernel-patch-openvz vzctl vzquota

Creating the kernel package

First you need to unpack the kernel:

cd /usr/src
tar xjf linux-source-2.6.18
cd linux-source-2.6.18

Next, you need to get a kernel config. You can use the config of the debian-kernel:

cp /boot/config-2.6.18-3-686 .config

Now you can apply openvz kernel patch and compile the kernel:

make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 kernel_image

Install the kernel and update initramfs:

cd ..
dpkg -i linux-image-2.6.18-1-openvz_1_i386.deb
update-initramfs -c -k 2.6.18-1-openvz
update-grub

Just reboot into your new openvz-kernel.