Installation guide

32
Managing EZ Templates
8 Create the mirror list files and set the path to your local repository. For example, you can do this
as follows:
For the Fedora 16 base RPM packages:
# echo 'http://123.145.145.123/download/fedora/16/i386/os/' >> download/mirrors/fedora-
core-16
For the updated versions of the Fedora 16 RPM packages:
# echo 'http://123.145.145.123/download/fedora/updates/16/i386' >>
download/mirrors/updates-released-fc16
The aforementioned commands create the fedora-core-16 and updates-released-
fc16 files in the /vz/root/101/var/www/html/download/mirrors directory on the
Node and add the
http://123.145.145.123/download/fedora/16/i386/os/Fedora/RPMS and
http://123.145.145.123/download/fedora/updates/16/i386 strings to them,
respectively.
9 Open the /vz/template/conf/vztt/url.map file on the Node for editing (e.g., by using
vi), and change the value of the $FC_SERVER variable as follows:
$FC_SERVER http://123.145.145.123
10 Grant the apache user and the apache group access to the created repositories inside
Container 101 by executing the following command on the Node:
# vzctl exec 101 chown -R apache.apache /var/www/html/download
Example 2: Accessing the Repository via the file protocol
Once you set up a local repository by following the instructions in the example above, you can start
using the vzpkg tool to obtain RPM packages for the Fedora 16 EZ template from this repository.
You can connect to these repositories via the http protocol from both remote and local Nodes.
You can further speed up the process of distributing RPM packages across your repository for
those Containers that reside on your local Node (that is, on the Node where the repositories are
stored). To do this, configure your system to use the file protocol instead of http to connect to
your repositories:
1 Open the /vz/template/fedora/16/x86/config/os/default/mirrorlist file on
the Node and comment the strings containing $FC_SERVER:
#$FC_SERVER/download/mirrors/fedora-core-16
#$FC_SERVER/download/mirrors/updates-released-fc16
2 Execute the following commands to create the repository files:
To create the
/vz/template/fedora/16/x86/config/os/default/repositories file on the
Node and to make it point to the Fedora 16 base RPM packages from your local repository:
# echo 'file:///vz/root/101/var/www/html/download/fedora/16/i386/os/Fedora/RPMS' >>
/vz/template/fedora/16/x86/config/os/default/repositories