Personal tools
You are here: Home Fedora Solved Post Install Solutions Yum local mirror list

Yum local mirror list

by strikeforce last modified Feb 24, 2008 05:42 PM
— filed under:

Some local mirrors are not listed in the fedora mirror list. This will explain how to create your own mirror list and use your own mirror list to speed up connecting to the repositories.

Applicable to Fedora Versions

  • Fedora 7
  • Fedora 8

Requirements

  1. You will need to know your edit program such as Gedit

Doing the Work

  1. Create the core Mirror List
  2. su -c 'gedit /etc/yum.repos.d/local.mirror'
  3. Put each mirror on each line like shown
  4. # local mirrorlist for Australia
    http://mirror.pacific.net.au/linux/fedora/linux/releases/$releasever/Everything/$basearch/os/
    http://mirror.aarnet.edu.au/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
    http://mirror.optus.net/fedora/releases/$releasever/Everything/$basearch/os/
    ftp://ftp.netcraft.com.au/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
  5. Open your repository file
  6. su -c 'gedit /etc/yum.repos.d/fedora.repo'
  7. Edit your repository file to show the bolded area
  8. [fedora]
    name=Fedora $releasever - $basearch
    failovermethod=priority
    #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
    #mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
    mirrorlist=file:///etc/yum.repos.d/local.mirror
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

    [fedora-debuginfo]
    name=Fedora $releasever - $basearch - Debug
    failovermethod=priority
    #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
    enabled=0
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

    [fedora-source]
    name=Fedora $releasever - Source
    failovermethod=priority
    #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
    enabled=0
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
  9. This will enable yum to use your local mirror file. This can be done with any repository file  using the same method

Troubleshooting

How to test

  1. Run yum to see if there is a speed increase in connecting to the repository
  2. yum list all
  3. Typical errors that are encountered are due to errors in your files that you have edited please double check them

Common problems and fixes

More Information

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net

Added Reading

Document Actions
Log in


Forgot your password?
New user?