6,534
edits
Changes
added yum method of installation
== Requirements ==
This guide assumes you are running recent release of Fedora Core (like FC5) or RHEL/CentOS 4. Currently, OpenVZ kernel tries to support the same hardware that Red Hat kernels support. For full hardware compatibility list, see [http://www.virtuozzo.com/en/products/virtuozzo/hcl/ Virtuozzo HCL].
=== rpm or yum? ===
In case you have yum utility available on you system, you may want to use it effectively to install and update OpenVZ packages. In case you don't have yum, or don't want to use it, you can use plain old rpm. Instructions for both rpm and yum are provided below.
=== yum pre-setup ===
If you want to use yum, you should set up OpenVZ yum repository first.
Download [http://download.openvz.org/openvz.repo openvz.repo] file and put it to your <code>/etc/yum.repos.d/</code> repository. This can be achieved by the following commands, as root:
<pre>
# cd /etc/yum.repos.d
# wget http://download.openvz.org/openvz.repo
</pre>
In case you can not cd to /etc/yum.repos.d, it means either yum is not installed on your system, or yum version is too old. In that case, just stick to rpm installation method.
== Kernel installation ==
{{Note|In case you want to recompile the kernel yourself rather than use the one provided by OpenVZ, see [[kernel build]].}}
First, you need to choose what “flavor” of the kernel you want to install. Please refer to [[Kernel flavors]] for more information.
=== Using yum ===
Run the following command
<pre>
# yum install ovzkernel[-flavor]
</pre>
Here <code>[-flavor]</code> is optional, and can be <code>-smp</code> or <code>-enterprise</code>. Refer to [[kernel flavors]] for more info.
=== Using rpm ===
Get the kernel binary RPM from the [http://openvz.org/download/kernel/ Download » Kernel] page, or directly from [http://download.openvz.org/kernel/ download.openvz.org/kernel], or from one of its [[Download mirrors|mirrors]]. You need only one kernel RPM so please [[Kernel flavors|choose the appropriate one]] depending on your hardware.
<pre>
# rpm -ihv ovzkernel[-nameflavor]*.rpm
</pre>
Here <code>[-flavor]</code> is optional, and can be <code>-smp</code> or <code>-enterprise</code>. Refer to [[kernel flavors]] for more info.
{{Note|<tt>rpm -U</tt> (where <tt>-U</tt> stands for ''upgrade'') should '''not''' be used, otherwise all currently installed kernels will be uninstalled.}}
; vzquota
: A utility to manage quotas for VPSs. Mostly used indirectly (by vzctl).
=== Using yum ===
<pre>
# yum install vzctl vzquota
</pre>
=== Using rpm ===
Download the binary RPMs of these utilities from [http://openvz.org/download/utils/ Download » Utils], or directly from [http://download.openvz.org/utils/ download.openvz.org/utils], or from one of its [[Download mirrors|mirrors]]. Install them:
<pre>
# rpm -Uhv vzctl*.rpm vzquota*.rpm
</pre>
<pre>
# /sbin/service vz start
</pre>