Creating A Local Mirror (Fedora)
Create a script that you’ll be able to setup as a cron entry to run daily. For a FC7 mirror I used the following:
#!/bin/bash ARCH=i386 # Set to the architecture of your systems # Mirror found at: http://mirrors.fedoraproject.org/publiclist/Fedora/7/ # Be sure to include trailing slash. RELEASES_DIR=/clientdata/yum/fedora/releases/7/Fedora/$ARCH/ RELEASES_URL=rsync://mirrors.kernel.org/fedora/releases/7/Fedora/$ARCH/ CORE_DIR=/clientdata/yum/fedora/releases/7/Live/$ARCH/os/ CORE_URL=rsync://mirrors.kernel.org/fedora/releases/7/Live/i386/os/ UPDATES_URL=rsync://mirrors.kernel.org/fedora/updates/7/$ARCH/ UPDATES_DIR=/clientdata/yum/fedora/updates/7/$ARCH/ mkdir -p $RELEASES_DIR cd $RELEASES_DIR || exit rsync --recursive --delete -v $RELEASES_URL . mkdir -p $CORE_DIR cd $CORE_DIR || exit rsync --recursive --delete -v $CORE_URL . mkdir -p $UPDATES_DIR cd $UPDATES_DIR || exit rsync --recursive --delete -v $UPDATES_URL .
Next you’ll have to configure your systems to use your local repository for updates by setting up a baseurl entry in /etc/yum.repos.d/fedora-updates.repo as described here.