此内容没有您所选择的语言版本。
8.2. Synchronization with Local Media
Although it is possible to conduct the import directly from the Red Hat Network website, this should be done only if Channel Content ISOs are not available. It takes a long time to download a channel's content via the Internet. For this reason, Red Hat recommends you use ISOs, if they are available, for the initial import.
8.2.1. Preparing for Import from Local Media 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Channel Content ISOs are special collections that contain both packages and XML dumps of metadata. Download the ISO images from the Red Hat Customer Portal website on a machine connected to the Internet and then transfer to the Red Hat Satellite.
Procedure 8.1. Obtain the Channel Content ISOs
- Log into the web interface.
- Click Channels in the top navigation bar.
- Click on the Red Hat Satellite channel. Ensure you select the Satellite channel that corresponds to your version of Satellite.
- 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 Red Hat Entitlement Certificate has been uploaded to Red Hat Network and correctly identifies the target channels.
This next procedure mounts the Channel Content ISOs and copies the contents to a temporary repository directory.
Procedure 8.2. Mount and copy Channel Content ISOs
- Log into the machine as root.
- Create a directory in
/mnt/
to store the file(s) with the command:mkdir /mnt/import/
# mkdir /mnt/import/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Mount the ISO file using the following command:
mount [iso_filename] /mnt/import -o loop
# mount [iso_filename] /mnt/import -o loop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a target directory for the files:
mkdir /var/rhn-sat-import/
# mkdir /var/rhn-sat-import/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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/
# cp -ruv /mnt/import/* /var/rhn-sat-import/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Then unmount
/mnt/import
in preparation for the next ISO:umount /mnt/import
# umount /mnt/import
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Repeat these steps for the channel content ISO file of every channel that you need to import separately. Do not use combined full or incremental sources of channel content ISOs.
8.2.2. Import from Local Media 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The following process assumes the user has completed Section 8.2.1, “Preparing for Import from Local Media” and copied all data to
/var/rhn-sat-import
.
- List the channels available for import.
satellite-sync --list-channels --mount-point=/var/rhn-sat-import
# satellite-sync --list-channels --mount-point=/var/rhn-sat-import
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Initiate the import of a specific channel using a channel label presented in the previous list.
satellite-sync --channel=[channel-label] --mount-point=/var/rhn-sat-import
# satellite-sync --channel=[channel-label] --mount-point=/var/rhn-sat-import
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Importing package data can take up to two hours per channel. Register systems to channels as soon as they appear in the Red Hat Satellite web interface. No packages are necessary for registration, although updates cannot be retrieved from the Satellite until the channel is completely populated. - Repeat this step for each channel or include them all within a single command by passing each channel label preceded with an additional
-c
flag, like so:satellite-sync -c [channel-label-1] -c [channel-label-2] --mount-point /var/rhn-sat-import
# satellite-sync -c [channel-label-1] -c [channel-label-2] --mount-point /var/rhn-sat-import
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
After running the preceding command, the population of the channel executes until completion. All packages move out of the repository; verify with the following command:
cd /var/rhn-sat-import/; ls -alR | grep rpm
# cd /var/rhn-sat-import/; ls -alR | grep rpm
If all RPMs are installed and moved to their permanent locations, the count appears as zero. If so, remove the temporary
/var/rhn-sat-import/
repository.
rm -rf /var/rhn-sat-import
# rm -rf /var/rhn-sat-import