Editing User Guide/Installation and Preliminary Operations
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 27: | Line 27: | ||
==== Software Compatibility ==== | ==== Software Compatibility ==== | ||
− | The Hardware Node should run either Red Hat Enterprise Linux | + | The Hardware Node should run either Red Hat Enterprise Linux 3 or 4, or Fedora Core 3 or 4, or CentOS 3.4 or 4. The detailed instructions on installing these operating systems for the best performance of OpenVZ are provided in the next sections. |
This requirement does not restrict the ability of OpenVZ to provide other Linux versions as an operating system for Virtual Private Servers. The Linux distribution installed in a Virtual Private Server may differ from that of the host OS. | This requirement does not restrict the ability of OpenVZ to provide other Linux versions as an operating system for Virtual Private Servers. The Linux distribution installed in a Virtual Private Server may differ from that of the host OS. | ||
Line 60: | Line 60: | ||
! Partition !! Description !! Typical size | ! Partition !! Description !! Typical size | ||
|- | |- | ||
− | | / || Root partition containing all Hardware Node operating system files | | + | | / || Root partition containing all Hardware Node operating system files | 2–4 Gb |
|- | |- | ||
− | | swap || Paging partition for the Linux operating system || 2 times RAM | + | | swap || Paging partition for the Linux operating system || 2 times RAM |
|- | |- | ||
| /vz || Partition to host OpenVZ templates and Virtual Private Servers || all the remaining space on the hard disk | | /vz || Partition to host OpenVZ templates and Virtual Private Servers || all the remaining space on the hard disk | ||
|} | |} | ||
− | + | It is suggested to use the ext3 file system for the /vz partition. This partition is used for holding all data of the Virtual Private Servers existing on the Hardware Node. Allocate as much disk space as possible to this partition. It is not recommended to use the reiserfs file system as it is proved to be less stable than the ext3, and stability is of paramount importance for OpenVZ-based computers. | |
− | The root partition will host the operating system files. | + | The root partition will host the operating system files. The server set of Fedora Core 4 occupies approximately 1 GB of disk space, so 1 GB is the minimal size of the root partition. The size of the swap partition shall be two times the size of physical RAM installed on the Hardware Node. |
+ | The figure below presents a system with a 12 GB SCSI hard drive. | ||
+ | |||
+ | Figure 4: Fedora Core Installation - Disk Druid | ||
+ | Please keep in mind that Virtual Private Server private areas, containing all data of the Virtual Private Servers shall reside on this single /vz disk partition together with all the templates installed. | ||
=== Finishing OS Installation === | === Finishing OS Installation === | ||
Line 76: | Line 80: | ||
On the Firewall Configuration screen, choose No firewall. Option Enable SELinux should be set to Disabled. | On the Firewall Configuration screen, choose No firewall. Option Enable SELinux should be set to Disabled. | ||
− | Fedora Core Installation - Disabling Firewall and SELinux | + | Figure 5: Fedora Core Installation - Disabling Firewall and SELinux |
After finishing the installation and rebooting your computer, you are ready to install OpenVZ on your system. | After finishing the installation and rebooting your computer, you are ready to install OpenVZ on your system. | ||
Line 84: | Line 88: | ||
First of all, you should download the kernel binary RPM from http://openvz.org/download/kernel/. You need only one kernel RPM, so please choose the appropriate kernel binary depending on your hardware: | First of all, you should download the kernel binary RPM from http://openvz.org/download/kernel/. You need only one kernel RPM, so please choose the appropriate kernel binary depending on your hardware: | ||
− | |||
− | |||
* If there is more than one CPU available on your Hardware Node (or a CPU with hyperthreading), select the vzkernel-smp RPM. | * If there is more than one CPU available on your Hardware Node (or a CPU with hyperthreading), select the vzkernel-smp RPM. | ||
* If there is more than 4 Gb of RAM available, select the vzkernel-enterprise RPM. | * If there is more than 4 Gb of RAM available, select the vzkernel-enterprise RPM. | ||
* Otherwise, select the uniprocessor kernel RPM (vzkernel-version). | * Otherwise, select the uniprocessor kernel RPM (vzkernel-version). | ||
− | |||
− | |||
− | |||
Next, you shall install the kernel RPM of your choice on your Hardware Node by issuing the following command: | Next, you shall install the kernel RPM of your choice on your Hardware Node by issuing the following command: | ||
Line 130: | Line 129: | ||
kernel.sysrq = 1 | kernel.sysrq = 1 | ||
# TCP Explict Congestion Notification | # TCP Explict Congestion Notification | ||
− | net.ipv4.tcp_ecn = 0 | + | #net.ipv4.tcp_ecn = 0 |
# we do not want all our interfaces to send redirects | # we do not want all our interfaces to send redirects | ||
net.ipv4.conf.default.send_redirects = 1 | net.ipv4.conf.default.send_redirects = 1 | ||
Line 151: | Line 150: | ||
* vzctl: this package is used to perform different tasks on the OpenVZ Virtual Private Servers (create, destroy, start, stop, set parameters etc.). | * vzctl: this package is used to perform different tasks on the OpenVZ Virtual Private Servers (create, destroy, start, stop, set parameters etc.). | ||
* vzquota: this package is used to manage the VPS quotas. | * vzquota: this package is used to manage the VPS quotas. | ||
+ | * vzpkg: this package is used to work with OpenVZ templates. | ||
You can download the corresponding binary RPMs from http://openvz.org/download/utils/. | You can download the corresponding binary RPMs from http://openvz.org/download/utils/. | ||
On the next step, you should install these utilities by using the following command: | On the next step, you should install these utilities by using the following command: | ||
− | # rpm –Uhv vzctl*.rpm vzquota*.rpm | + | # rpm –Uhv vzctl*.rpm vzquota*.rpm vzpkg*.rpm |
{{Note|During the packages installation, you may be presented with a message telling you that rpm has found unresolved dependencies. In this case you have to resolve these dependencies first and then repeat the installation.}} | {{Note|During the packages installation, you may be presented with a message telling you that rpm has found unresolved dependencies. In this case you have to resolve these dependencies first and then repeat the installation.}} | ||
Line 167: | Line 167: | ||
=== Installing OS Templates === | === Installing OS Templates === | ||
− | Template is a set of package files to be installed into a | + | Template (or package set) is a set of package files to be installed into a VPS. Operating system templates are used to create new Virtual Private Servers with a pre-installed operating system. Therefore, you are bound to download at least one OS template from http://openvz.org/download/template/ and install it. |
− | + | OS template metadata contain the information needed to create a template cache. You have to specify an OS template on the VPS creation, so you need to install the metadata for at least one OS template and prepare the template cache. | |
− | |||
− | For example, this is how | + | For example, this is how the template preparation for Fedora Core 3 will look like: |
<pre> | <pre> | ||
− | # | + | # rpm –ihv vztmpl-fedora-core-3-1.0-2.noarch.rpm |
− | # | + | Preparing... ########################################### [100%] |
+ | 1: vztmpl-fedora-########################################### [100%] | ||
+ | # vzpkgcache | ||
+ | Creating cache for fedora-core-3 OS template | ||
+ | Setting up install process | ||
+ | <…some output skipped for clarity…> | ||
+ | Packing cache file fedora-core-3.tar.gz ... | ||
+ | Cache file fedora-core-3.tar.gz [130M] created. | ||
</pre> | </pre> | ||
+ | The first command installs the template metadata, while the second one creates the template cache. Note that this operation can take a considerable time (tens of minutes). | ||
+ | You can also use one of the already pre-cached OS templates available at http://openvz.org/download/template/cache/ for the VPS creation. To this effect, you should download the corresponding OS template and place it to the /vz/template/cache directory on the Node. | ||
<noinclude>{{UG/Footer}}</noinclude> | <noinclude>{{UG/Footer}}</noinclude> |