If some of your Virtual Environments are to run the Red Hat Enterprise Linux 4 (RHEL 4) or 5 (RHEL 5) distribution, you may wish to create a special caching proxy server - RHN (Red Hat Network) Proxy Server - allowing for faster RHEL packages downloads, easier distribution, and lower bandwidth requirements. RHN Proxy Servers can be created using the
vzrhnproxy utility shipped with Virtuozzo 4.0. This utility can be installed on any computer (including Virtuozzo VEs) running the RHEL 4 and RHEL 5 Linux distributions with the
rpm -i command.
Notes: 1. You may need to install a number of additional packages to satisfy the
2. You can also try to deploy an RHN Proxy Server on systems running other RHEL-based Linux distributions (e.g. CentOS 5 or Fedora Core 6); however,
vzrhnproxy has not been extensively tested with them.
Let us assume that you wish to create an RHN Proxy Server on the server with the IP address of
192.168.10.10 that will serve all VEs running the 32-bit version of RHEL 5 and residing on the Hardware Node with the hostname of
mycomputer1 and the IP address of
192.168.0.125. To this effect, you should perform the following operations:
vzrhnproxyutility is installed on this server.
REDHAT_PASSWORDparameters, respectively, in the
/etc/vz/pkgproxy/rhn.conffile on the Proxy Server. These credentials will be used by
vzrhnproxyon the next step to register your system profile with RHN. For example:
# vi /etc/vz/pkgproxy/rhn.conf
# vzrhnproxy register i386 5Server mycomputer1 192.168.0.125
registering for i386-5Server-mycomputer1
5Server denote the system architecture and the operating system you wish to register with RHN (in our case, we are registering the 32-bit version of the Red Hat Enterprise Linux 5 server).
During the command execution,
rhn.conffile on the previous step;
192.168.0.125(i.e. our Hardware Node) access to the Proxy Server.
/etc/vztt/vztt.conffile for editing (e.g. using
vi) and change the value of the
RH_SERVERparameter as follows:
From this moment on:
192.168.0.125requests certain packages included in the RHEL 5 distribution for the first time (e.g. while caching the RHEL 5 OS EZ template), this request will be sent to the Proxy Server which, in its turn, will connect to Red Hat Network and retrieve the requested packages. These packages will then be downloaded to the Proxy Server where they are cached and finally returned to the Hardware Node.
You can make the Proxy Server serve the requests for RHEL 5 packages from more than one Node. To this effect, you should specify the IP addresses of the corresponding Hardware Nodes during the
vzrhnproxy register command execution and properly edit the
/etc/vztt/vztt.conf files on each of these Nodes (please see Step 3 and 4 above). Please keep in mind that, while executing the
vzrhnproxy register command, you should specify the hostname of one Hardware Node only; this can be the hostname of any Node to be handled by the Proxy Server.
You can also create and register several system profiles with Red Hat Network. For example, if you have one or more Hardware Nodes hosting VEs with the x86-64-bit version of RHEL 5, you may wish to use the Proxy Server for handling the packages included in this RHEL 5 version as well. To this effect, you should perform once more Steps 1-4 described above and use the following command on Step 3 to register a new system profile with RHN:
# vzrhnproxy register x86_64 5Server mycomputer2 192.168.22.22
registering for x86_64-5Server-mycomputer2
192.168.22.22 is the IP address of the Hardware Node hosting 64-bit Virtual Environments.
To list all system profiles registered with RHN, you can execute the following command on the Proxy Server:
# vzrhnproxy list
As you can see, three system profiles are currently registered with RHN: two for servers running the x86-64-bit version of RHEL 5 and one for the server running the 32-bit version of RHEL 5. For each of these profiles, the corresponding pseudo-repository containing the RHEL 5 package repodata exists on the Proxy Server.
After a lapse of time, the repodata (and, consequently, the cache on the Proxy Server) may become obsolete. In this case you can use the
vzrhnproxy update command to update the repodata in pseudo-repositories on the Proxy Server. For example, the following command will update the repodata in the pseudo-repository corresponding to the
# vzrhnproxy update i386_5Server-mycomputer2
Please send us your feedback on this help page