There is one repository I'm creating here:
The 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/7 and press Enter
- Type mkdir -p /data/www/yumrpms/epel/pki and press Enter
- Type chown -R apache:apache /data/www/yumrpms/epel/7 and press Enter
- Type chown -R apache:apache /data/www/yumrpms/epel/pki and press Enter
- 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/7/x86_64 /data/www/yumrpms/epel/7/ and press Enter
- Wait while the rpms are downloaded, this might take a while
- Type createrepo /data/www/yumrpms/epel/7/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 wget -O /data/www/yumrpms/epel/pki/RPM-GPG-KEY-EPEL-7 https://getfedora.org/static/352C64E5.txt and press Enter
- Type chown -R apache:apache /data/www/yumrpms/epel/7/x86_64 and press Enter
This completes the creation of the 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/7/x86_64 --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. |
|