Installation guide
31
Managing EZ Templates
• Container 101 is started. It has the IP address of 123.145.145.123 and can be accessed
from other networks.
• The apache web server is running inside Container 101 and the default document root for
apache is /var/www/html, i.e. the apache web server stores its sites in the
/vz/root/101/var/www/html directory on the Node.
• The apache user and group inside Container 101 are apache.
To create a local repository for Fedora 16, do the following:
1 Install the fedora-core-16-x86 OS EZ template (if it is not already installed):
# vzpkg install template fedora-core-16-x86-tmpl-4.7.0-3.noarch.rpm
Preparing... ################################ [100%]
1:fedora-core-16-x86-tmpl ################################ [100%]
2 Change to the /vz/root/101/var/www/html directory, and create two subdirectories
within it:
Note: You can also log in to Container 101 and perform the operations described in Steps 2-8 from
inside the Container. In this case your working directory inside Container 101 must be
/var/www/html, and you will need to install the createrepo package inside the Container and grant
the Container access to the CD-ROM drive on the Node.
• The subdirectory where the base RPM packages for Fedora 16 will be stored:
# mkdir -p download/fedora-core/16/i386/os/Fedora/RPMS
• The subdirectory where the updated versions of RPM packages for Fedora 16 will be
stored:
# mkdir -p download/fedora-core/updates/16/i386
3 Copy all the packages comprising the Fedora 16 distribution (e.g., from your Fedora distribution
disks) to the download/fedora/16/i386/os/Fedora/RPMS directory on the Node.
4 Get the updates for Fedora 16, and put them to the download/fedora-
core/updates/16/i386 directory on the Node.
5 Install the createrepo package on the Node, for example:
# rpm -Uhv createrepo-0.4.3-1.2.el4.rf.noarch.rpm
Preparing... #################################### [100%]
1:createrepo #################################### [100%]
6 Change to the /vz/root/101/var/www/html directory and create the following metadata
repositories:
• For the Fedora 16 base RPM packages:
# createrepo download/fedora/16/i386/os
• For the updated versions of the Fedora 16 RPM packages:
# createrepo download/fedora-core/updates/16/i386
Creating the package metadata repository may take some time depending on the speed of your
processor and hard disk drive.
7 Create a directory for storing mirror site lists. In our case, the lists will be kept in the
/vz/root/101/var/www/html/download/mirrors directory:
# mkdir -p download/mirrors