Create Fedora 13 local Yum Repository

yumfedora Fedora 13 (Goddard) is out and it’s time to add it to our arsenal of local yum repositories. We all know the importance of creating a local YUM repository on your LAN. Not only do you decrease the time it takes to download and install updates, you also decrease bandwidth usage.

Fedora 13 (Goddard) release notes

This How To will show you a simple yet effective way to create your local Fedora 13 YUM repository and client.

TIP: Distribute your Fedora YUM configuration via your Puppet Master

Preliminary Note:

I am using two Fedora 13 installations in this tutorial with configured with Apache httpd

  • (IP Fedora 13 YUM Repository and httpd server
  • (IP Fedora 13 YUM client

Configure Fedora YUM repo and httpd server as follows:

Create the following Directories:

# mkdir -p /var/www/html/fedora/13/os/i386
# mkdir -p /var/www/html/fedora/13/os/x86_64

Create a bash script that will rsync your local YUM Repository server with your local YUM mirror (Make sure the mirror supports rsync).

Fedora Mirror list –

# vi
# This script will create a local Fedora 13 mirror via Rsync
# Note: This script will download Fedora 13

rsync="rsync -avrt --bwlimit=256"

archlist="i386 x86_64"

for ver in $verlist
 for arch in $archlist
  for base in $baselist
    $rsync $remote $local/$ver/$base/$arch/
# chmod 755

Add the bash script to your crontab to update your local repository every night (01H00 in this case)

# crontab -e
#       minute (0-59),
#       |       hour (0-23),
#       |       |       day of the month (1-31),
#       |       |       |       month of the year (1-12),
#       |       |       |       |       day of the week (0-6 with 0=Sunday).
#       |       |       |       |       |       commands
# -----------[ cron jobs  ]------------ #

# Update Local YUM repo update from
     0    1       *       *       *        /path/to/

Configure Fedora YUM client servers as follows:

Rename all existing yum repositories from *.repo to *.old

# vi /etc/yum.repos.d/localFedora.repo
name=Fedora $releasever - $basearch

Test your setup by running a yum update on your client machine.

# yum update

Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* update:
* base: