Because Fedora Core is an RPM based Linux distribution, it's quite easy to keep it up to date. Fedora can easily be updated through yum, an update tool which fetches the latest RPM packages from a mirror and installs them. A mirror is a server that provides a copy of one or more files. Mirroring a site reduces traffic to the original source site and spreads the stress and bandwidth costs across other sites. Running a local mirror however, offers very fast access through the LAN connection to local users. Think about it this way: if you're the network admin of a network composed of Fedora Core systems, those systems will need to be updated at some point. And because they are all using the same distribution, the downloaded update packages will be the same. So basically, the computers in that network will use your precious bandwidth to download the same update files, several times, at rather low speeds. Pointless. A local update mirror will prevent unnecessary bandwidth usage by downloading the packages once and then provide them to the local computers at blazing speeds.
1. Install createrepo and repoview
2. Create the directories
mkdir -v /var/www/html/yum/updates/6
mkdir -v /var/www/cache
4. Create the base repository headers
5. Select an rsync updates mirror
- Click HERE and choose the nearest mirror which starts with rsync://.
6. Synchronize the local updates directory with the mirrored one
- Append /updates/6/i386 to the chosen rsync mirror. For example, if you choose: rsync://sunsite.icm.edu.pl/fedora/linux/core/, it becomes: rsync://sunsite.icm.edu.pl/fedora/linux/core/updates/6/i386.
- Synchronize the local directory content with the remote one:
--exclude=debug/ --exclude=repodata/ --exclude=*debuginfo* --exclude=*i18*
--exclude=*langpack* /var/www/html/yum/updates/6
- Create the repository headers:
7. Create a daily cron script
- Create a new file
rsync -avrt rsync://sunsite.icm.edu.pl/fedora/linux/core/updates/6/i386
--exclude=debug/ --exclude=repodata/ --exclude=*debuginfo* --exclude=*i18*
--exclude=*langpack* /var/www/html/yum/updates/6
createrepo -q -c /var/www/cache/ /var/www/html/yum/updates/6/i386
repoview -qu http://localhost/yum/updates/6/i386 /var/www/html/yum/updates/6/i386
exit 0
8. Edit yum configuration file
- You will now have to edit the /etc/yum.conf file on every local network machine that will use the new repository. Add the following content to the end of the yum.conf file:
name=Fedora Core $releasever - $basearch - Released Updates
#mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
baseurl=http://192.168.0.xx/yum/updates/$releasever/$basearch/
enabled=1
gpgcheck=0
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://192.168.0.xx/yum/base/RPMS
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=0
- Now edit the /etc/yum.repos.d/fedora-updates.repo file on each machine and disable the updates section. To do this, look for the line enabled=1 under the [updates] section and replace it with enabled=0.
If everything worked out well, you should be able to run yum update from any of the local computers and it will use the local repository as the update mirror.