Installation guide
35
Managing EZ Templates
4 Inside Container 111, create a directory where the RPM packages for Red Hat Enterprise Linux
4 will be stored:
# mkdir -p /vz/root/111/var/www/html/download/redhat/as4/i386/os/ \
RedHat/RPMS
5 Copy the RPM packages from the RHEL 4 distribution disks to the
/vz/root/111/var/www/html/download/redhat/as4/i386/os/RedHat/RPMS
directory by executing the following command for each of the RHEL 4 CDs:
# cp /media/cdrom/RedHat/RPMS*.rpm /vz/root/111/var/www/html/ \
download/redhat/as4/i386/os/RedHat/RPMS
6 Install the createrepo package on the Hardware Node, for example:
# rpm -Uhv createrepo-0.4.3-1.2.el4.rf.noarch.rpm
Preparing... #################################### [100%]
1:createrepo #################################### [100%]
7 Create the metadata repository for the RHEL 4 packages with the createrepo utility:
# createrepo /vz/root/111/var/www/html/download/redhat/as4/ \
i386/os/RedHat/RPMS
Creating the RPM metadata repository may take some time depending on the speed of your
processors and hard disk drive.
8 Create a directory for keeping mirror site lists. In our case, mirror site lists will be stored in the
/vz/root/111/var/www/html/download/mirrors directory on the Node:
# mkdir -p /vz/root/111/var/www/html/download/mirrors
9 Create the /vz/root/111/var/www/html/download/mirrors/redhat-as4 mirror list
file and make it point to the repository inside Container 111 where RPM packages for RHEL 4
are stored:
# echo "http://144.134.134.144/download/redhat/as4/i386/os/RedHat/ \
RPMS/" > /vz/root/111/var/www/html/download/mirrors/redhat-as4
This command makes the
/vz/root/111/var/www/html/download/mirrors/redhat-as4 file on the Node and
adds the
http://144.134.134.144/download/redhat/as4/i386/os/RedHat/RPMS string to
the file.
So, we have just created a repository for your RHEL 4 OS EZ template. Now you can cache the
redhat-as4-x86 EZ template and start creating Containers on its basis. However, if you wish to
receive package updates from the RHEL 4 website, you should additionally perform the following
steps:
1 On the Node, run the up2date utility and register your up2date account with RHEL 4. Please
consult the up2date documentation to complete this task.
Note: If your Node has another Linux OS installed on it (e.g., Fedora 16), you need to create a special
Container which is to run Red Hat Enterprise Linux 4 and register the up2date account from inside this
Container.
2 Inside Container 111, create a directory where the updated versions of the RHEL 4 packages
will be stored:
# mkdir -p /vz/root/111/var/www/html/download/redhat/updates/as4/i386