Previous page

Next page

Locate page in Contents

Print this page

Setting Up RHN Proxy Server for RHEL OS EZ Templates

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 vzrhnproxy dependencies.

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:

  1. Log in to the server where you are planning to create the RHN Proxy Server (further referred to as Proxy Server) and make sure the vzrhnproxy utility is installed on this server.
  2. Specify a valid user name and password you use to log in to Red Hat Network (RHN) as the values of the REDHAT_LOGIN and REDHAT_PASSWORD parameters, respectively, in the /etc/vz/pkgproxy/rhn.conf file on the Proxy Server. These credentials will be used by vzrhnproxy on the next step to register your system profile with RHN. For example:

    # vi /etc/vz/pkgproxy/rhn.conf

    REDHAT_LOGIN="user1"

    REDHAT_PASSWORD="2WSX0OKM"

    ...

  3. Execute the following command on the Proxy Server:

    # vzrhnproxy register i386 5Server mycomputer1 192.168.0.125

    registering for i386-5Server-mycomputer1

    ...

    where x86 and 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, vzrhnproxy will:

  4. On the Hardware Node:

From this moment on:

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

...

where 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

i386_5Server-mycomputer1

x86_64-5Server-mycomputer2

x86_64-5Server-mycomputer3

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 i386_5Server-mycomputer1 profile:

# vzrhnproxy update i386_5Server-mycomputer2

Please send us your feedback on this help page