Guides‎ > ‎Other‎ > ‎YUM‎ > ‎RepoForge / RPMforge‎ > ‎

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/repoforge/redhat/el5 and press Enter
  • Type mkdir -p /data/www/yumrpms/repoforge/pki and press Enter
  • Type wget -O /data/www/yumrpms/repoforge/pki/RPM-GPG-KEY-rpmforge-dag http://apt.sw.be/RPM-GPG-KEY.dag.txt and press Enter
  • Type chown -R apache:apache /data/www/yumrpms/repoforge/redhat/el5 and press Enter
  • Type chown -R apache:apache /data/www/yumrpms/repoforge/pki and press Enter


i386

  • Type mkdir -p /data/www/yumrpms/repoforge/redhat/el5/en/i386/rpmforge 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:
    •  --bwlimit=3096
  • Type /usr/bin/rsync -avHh --exclude=repodata --exclude=repoview --exclude=debug --delete --delete-after --bwlimit=1024 rsync://mirror.digitalpacific.com.au/repoforge/redhat/el5/en/i386/rpmforge/ /data/www/yumrpms/repoforge/redhat/el5/en/i386/rpmforge/ and press Enter
  • Wait while the rpms are downloaded, this might take a while
  • Type createrepo /data/www/yumrpms/repoforge/redhat/el5/en/i386/rpmforge/RPMS 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/repoforge/redhat/el5/en/i386 and press Enter
This completes the creation of the i686 repository.


x86_64

  • Type mkdir -p /data/www/yumrpms/repoforge/redhat/el5/en/x86_64/rpmforge 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:
    •  --bwlimit=3096
  • Type /usr/bin/rsync -avHh --exclude=repodata --exclude=repoview --exclude=debug --delete --delete-after --bwlimit=1024 rsync://mirror.digitalpacific.com.au/repoforge/redhat/el5/en/x86_64/rpmforge/ /data/www/yumrpms/repoforge/redhat/el5/en/x86_64/rpmforge/ and press Enter
  • Wait while the rpms are downloaded, this might take a while
  • Type createrepo /data/www/yumrpms/repoforge/redhat/el5/en/x86_64/rpmforge/RPMS 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/repoforge/redhat/el5/en/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/repoforge/redhat/el5/en/x86_64/rpmforge/RPMS --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.