There are two repositories I'm creating here:
Common Steps- Establish an ssh session to your local YUM server
- Type yum install -y rsync yum-utils wget and press Enter
- Wait while the components are installed
- Type mkdir -p /data/www/yumrpms/epel/6 and press Enter
- Type mkdir -p /data/www/yumrpms/epel/pki and press Enter
- Type wget -O /data/www/yumrpms/epel/pki/RPM-GPG-KEY-EPEL-6 https://getfedora.org/static/0608B895.txt and press Enter
- Type chown -R apache:apache /data/www/yumrpms/epel/6 and press Enter
- Type chown -R apache:apache /data/www/yumrpms/epel/pki and press Enter
i386- The following command will download the rpms. Due
to the size of the download it can saturate your internet connection,
hence alter the following argument in the command to tune it to your
internet connection speed:
- Type /usr/bin/rsync
-avHh --exclude=repodata --exclude=repoview --exclude=debug --delete
--delete-after --bwlimit=3096
rsync://mirror.digitalpacific.com.au/epel/6/i386
/data/www/yumrpms/epel/6/ and press Enter
- Wait while the rpms are downloaded, this might take a while
- Type createrepo /data/www/yumrpms/epel/6/i386 and press Enter
- This command might take a while to complete as it has to process all the files that were downloaded
- Type chown -R apache:apache /data/www/yumrpms/epel/6/i386 and press Enter
This completes the creation of the i686 repository. x86_64- The following command will download the rpms. Due to the size of the download it can saturate your internet connection, hence alter the following argument in the command to tune it to your internet connection speed:
- Type /usr/bin/rsync -avHh --exclude=repodata --exclude=repoview --exclude=debug --delete --delete-after --bwlimit=3096 rsync://mirror.digitalpacific.com.au/epel/6/x86_64 /data/www/yumrpms/epel/6/ and press Enter
- Wait while the rpms are downloaded, this might take a while
- Type createrepo /data/www/yumrpms/epel/6/x86_64 and press Enter
- This command might take a while to complete as it has to process all the files that were downloaded
- Type chown -R apache:apache /data/www/yumrpms/epel/6/x86_64 and press Enter
This completes the creation of the x86_64 repository.
Client Configuration
Please refer to the steps on this page on how to point your other machines to use the internal repositories.
Additional Information
The rsync commands above can be re-run again at any time to update the repository.
Then re-run the createrepo command with --update, for example: createrepo /data/www/yumrpms/epel/6/i386 --update
You could setup a cron job to perform these commands daily/weekly/monthly if so desired.
The rsync commands above use an Australian based mirror, you might want to locate a mirror closer to you. |