Guides‎ > ‎Other‎ > ‎YUM‎ > ‎EPEL‎ > ‎

5 - Repositories

There are two repositories I'm creating here:
  • i386
    • For 32bit CentOS
  • x86_64
    • For 64bit CentOS


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/5 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-5 https://getfedora.org/static/217521F6.txt and press Enter
  • Type chown -R apache:apache /data/www/yumrpms/epel/5 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:
    •  --bwlimit=512
  • Type /usr/bin/rsync -avHh --exclude=repodata --exclude=repoview --exclude=debug --delete --delete-after --bwlimit=512 rsync://mirror.internode.on.net/epel/5/i386 /data/www/yumrpms/epel/5/ and press Enter
  • Wait while the rpms are downloaded, this might take a while
  • Type createrepo -d -s sha1 /data/www/yumrpms/epel/5/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/5/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:
    •  --bwlimit=512
  • Type /usr/bin/rsync -avHh --exclude=repodata --exclude=repoview --exclude=debug --delete --delete-after --bwlimit=512 rsync://mirror.internode.on.net/epel/5/x86_64 /data/www/yumrpms/epel/5/ and press Enter
  • Wait while the rpms are downloaded, this might take a while
  • Type createrepo -d -s sha1 /data/www/yumrpms/epel/5/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/5/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/5/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.