4.2. Configuring Proxy Precaching
yum as well as anaconda (for kickstart installations and provisioning). See the rhn_package_manager manual page for more information.
rhn_package_manager command to manually load RPM files into the Proxy server's cache, or you can create a cron job that uses the rsync command to perform the task automatically.
Note
4.2.1. Manually Loading RPM Files into the Proxy Cache
rhn_package_manager have been updated to avoid unwanted cache collisions. You can use the existing rhn_package_manager --copyonly command to populate the cache; (an alias to that option has been added with the more user-friendly name --cache-locally). Another significant change to rhn_package_manager is that it can now read and import packages from a channel export, which could for example be created on the Satellite server using the rhn-satellite-exporter utility. This is in addition to the other methods that rhn_package_manager can use to import RPM files, such as the --dir option for importing all RPM files in a directory, or a list of RPM files supplied on the command line.
/mnt/export:
# rhn_package_manager --cache-locally --from-export /mnt/export --channel my-channel-1
--channel option:
# rhn_package_manager --cache-locally --from-export /mnt/export
rhn_package_manager command. Mount the images one at a time and run the same command on each.
4.2.2. Automatically Loading RPM Files into the Proxy Cache
rsync command to download any updated RPM files to the Proxy cache. This assumes that you want to download all of the RPM files on the Satellite server to the Proxy. You need to run the cron job and rsync command as root on the Proxy server, but can then log in to the Satellite server as any user that has read access to the RPM store; this should be all users.
You need to set up SSH key pairs that enable the root user on the Proxy server to establish an SSH connection to $user on the Satellite server, without typing a password.
Important
root on the Proxy server:
ssh-keygen -t rsa -N '' -f /root/.ssh/id_dsa \ && cat /root/.ssh/id_dsa.pub | ssh user@satellite.example.com 'cat >> .ssh/authorized_keys'
# ssh user@satellite.example.com
You now need to add a cron job with an appropriate rsync command. For example, as root on the Proxy:
crontab -e 1 3 * * * /usr/bin/rsync -r user@satellite.example.com:/var/satellite/redhat/*/ /var/spool/rhn-proxy/rhn # write and quit with :wq
rsync command at 3:01 a.m. every day and downloads any RPM files that are on the Satellite server into the Proxy cache. The /var/satellite directory is the default Satellite root directory, but this is configurable. If you have changed it on your Satellite installation then adjust this command appropriately.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.