| Red Hat Docs > Manuals > Red Hat Network Manuals > |
Before distributing packages via RHN Satellite Server, the packages must first be uploaded to the Satellite. This section describes the process for importing packages and other channel data.
![]() | Important |
|---|---|
To populate custom channels correctly, you must first populate at least one Red Hat base channel. The RHN Satellite Synchronization Tool creates the necessary directory structures and permissions; without these, the custom channel tools will not work properly. For this reason, you should use these instructions to set up your base channel(s) and then refer to the RHN Channel Management Guide for steps to establish custom channels. |
To perform the RHN Satellite Server import, the following prerequisites must be met:
The RHN Satellite Server installation must have been performed successfully.
The Red Hat Network Channel Content ISOs must be available, or the Satellite must have access to the Internet and the RHN website.
Although it is possible to conduct the import directly from the RHN website, this should be done only if Channel Content ISOs are not available. It takes a long time to populate a channel from scratch over the Internet. For this reason, Red Hat urges you to use ISOs, if they are available, for initial import.
Channel Content ISOs are special collections that contain both packages and XML dumps of metadata. The ISO images can be downloaded from the RHN website on a machine connected to the Internet and then transferred to the Satellite. After logging in, click Channels in the top navigation bar and then the name of the channel for your version of RHN Satellite Server. Click the Downloads tab and use the instructions on the page to obtain the Channel Content ISOs, available by version of Red Hat Enterprise Linux. If the desired Channel Content ISOs do not appear, ensure your RHN Entitlement Certificate has been uploaded to RHN and correctly identifies the target channels.
Channel Content ISOs are mounted and then copied to a temporary repository directory. Before mounting the ISOs, ensure the temporary repository has enough disk space to copy all the contents into a single directory. For a single channel, the approximate required space is 3 GB. The process to copy Channel Content ISOs is to mount each one, copy its contents to the temporary repository, and then unmount the ISO. Each channel consists of several ISOs. Once finished, the administrator should delete the temporary directory and all of its contents. Follow these steps:
Log into the machine as root.
Insert the first Channel Content ISO that has been burned to disc.
Create a directory in /mnt/ to store the file(s) with the command:
mkdir /mnt/import/ |
Mount the ISO file from within the directory containing it using the command:
mount iso_filename /mnt/import -o loop |
Create a target directory for the files, such as:
mkdir /var/rhn-sat-import/ |
This sample command assumes the administrator wants to copy the contents of the ISO (mounted in /mnt/import/) into /var/rhn-sat-import/:
cp -ruv /mnt/import/* /var/rhn-sat-import/ |
Then unmount /mnt/import in preparation for the next CD or ISO:
umount /mnt/import |
Repeat these steps for each Channel Content ISO of every channel to be imported.
The rhns-satellite-tools package provides the satellite-sync program for managing all package, channel, and errata imports and synchronizations.
The following process assumes in the previous step the user has copied all data to /var/rhn-sat-import.
The first step in importing channels into the database is listing the channels available for import. This is accomplished with the command:
satellite-sync --list-channels --mount-point /var/rhn-sat-import |
The next step is to initiate the import of a specific channel. Do this using a channel label presented in the previous list. The command will look like:
satellite-sync -c rhel-i386-as-3 --mount-point /var/rhn-sat-import |
![]() | Note |
|---|---|
Importing package data can take up to two hours per channel. You may begin registering systems to channels as soon as they appear in the RHN Satellite Server's website. No packages are necessary for registration, although updates cannot be retrieved from the Satellite until the channel is completely populated. |
You may repeat this step for each channel or include them all within a single command by passing each channel label preceded by an additional -c flag, like so:
satellite-sync -c channel-label-1 -c channel-label-2 --mount-point /var/rhn-sat-import |
This conducts the following tasks in this order:
Populating the tables describing common features for channels (channel families). This can also be accomplished individually by passing the --step=channel-families option to satellite-sync.
Creating a particular channel in the database and importing the metadata describing the channel. Individually, use the --step=channels option.
Moving the RPM packages from the temporary repository into their final location. Individually, use the --step=rpms option.
Parsing the header metadata for each package in the channel, uploading the package data, and associating it with the channel. Individually, use the --step=packages option.
Identifying Errata associated with the packages and including them in the repository. Individually, use the --step=errata option.
After running the preceding sample command, the population of the channel should be complete. All of the packages should have been moved out of the repository; this can be verified with the command cd /var/rhn-sat-import/; ls -alR | grep rpm. If all RPMs have been installed and moved to their permanent locations, then this count will be zero, and the administrator may safely remove the temporary repository (in this case, /var/rhn-sat-import/).