Difference between revisions of "Mirrors"

From ArchWiki
Jump to: navigation, search
(add kangaroot mirror)
(Sort your mirrors by their speed)
Line 51: Line 51:
 
  # cp mirrorlist mirrorlist.backup
 
  # cp mirrorlist mirrorlist.backup
 
Edit mirrorlist.backup and uncomment mirrors you want to test with rankmirrors.
 
Edit mirrorlist.backup and uncomment mirrors you want to test with rankmirrors.
 +
 +
If your lazy and just want to uncomment everything, run the following in python:
 +
 +
import sys, os
 +
 +
file = "/home/user/locationOfFile"
 +
with open(file, "r") as fin:
 +
    with open(file + ".tmp", "w") as fout:
 +
        for line in fin:
 +
            if line.startswith("#S"):
 +
                fout.write(line[1:])
 +
            elif line.startswith("S"):
 +
                fout.write("#" + line)
 +
            else:
 +
                fout.write(line)
 +
os.remove(fin.name)
 +
os.rename(fout.name, fin.name)
  
 
Run the script against the mirrorlist.backup with the -n switch and redirect output to a new {{Filename|/etc/pacman.d/mirrorlist}} file:
 
Run the script against the mirrorlist.backup with the -n switch and redirect output to a new {{Filename|/etc/pacman.d/mirrorlist}} file:

Revision as of 19:53, 12 December 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end

Enabling your favorite mirror

The default pacman configuration (Template:Filename) for core looks like this:

[core]
Include = /etc/pacman.d/mirrorlist

If you want to use the HostEurope mirror as your default mirror, just add it before the Include line:

[core]
Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686
Include = /etc/pacman.d/mirrorlist
Note: The release of pacman 3.1 introduced the Template:Filename with the variable $repo, no need to maintain separate list for each repository.

Pacman will now try to connect to this mirror first. You can do the same for testing, extra, and community'.

Warning: Use the same mirror for all repositories. Otherwise packages may get installed that are incompatible to each other (like kernel26 from core and another (older) kernel module from extra).

Mirror list

This is a list of all known Arch Linux mirrors, that's more up to date than the official download page or the [http://repos.archlinux.org/viewvc.cgi/pacman-mirrorlist/trunk/ files in Template:Filename. If you know of a mirror that is not listed, please add it. Mirrors which are no longer updated or have been unavailable for a long time can be deleted.

Mirror status

You can check the status of the Arch mirrors and how up to date they are, by visiting: http://users.archlinux.de/~gerbra/mirrorcheck.html and/or http://www.archlinux.de/?page=MirrorStatus

Or

Check just how up-to-date your chosen mirror is by:

  1. pick a server and browse to "extra/os/"
  2. load http://www.archlinux.org/ in another tab or window
  3. compare the last-modified date of the "i686" directory on the mirror to the "Extra" date on the homepage, in the "Package Repositories" box to the right.
Note: Many sites also provide http service, but keep in mind that pacman relies on ftp to determine if a repository got updated. With http it fetches the repository database each time you run 'pacman -Sy', even if it didn't change since the last run.

Sort your mirrors by their speed

Don't forget to take full advantage of using the fastest mirror for you which you can determine via the included python script /usr/bin/rankmirrors. First, use pacman to install python if you haven't already done so:

# pacman -S python 

cd to the /etc/pacman.d/ directory:

# cd /etc/pacman.d

Backup your existing Template:Filename:

# cp mirrorlist mirrorlist.backup

Edit mirrorlist.backup and uncomment mirrors you want to test with rankmirrors.

If your lazy and just want to uncomment everything, run the following in python:

import sys, os

file = "/home/user/locationOfFile"
with open(file, "r") as fin:
    with open(file + ".tmp", "w") as fout:
        for line in fin:
            if line.startswith("#S"):
                fout.write(line[1:])
            elif line.startswith("S"):
                fout.write("#" + line)
            else:
                fout.write(line)
os.remove(fin.name)
os.rename(fout.name, fin.name)

Run the script against the mirrorlist.backup with the -n switch and redirect output to a new Template:Filename file:

# rankmirrors -n 6 mirrorlist.backup > mirrorlist

-n 6: rank the 6 fastest mirrors

Force pacman to refresh the package lists

After creating/editing your Template:Filename, (manually or by using /usr/bin/rankmirrors) issue the following command:

# pacman -Syy
Tip: Passing two --refresh or -y flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing pacman -Syy whenever a mirror is changed, is good practice and will avoid possible headaches.

Combining Sort your mirrors by their speed with Mirror status

It is not a good idea to just use the fastest mirror(s), since the fastest mirror(s) might be out of date. The preferred way would be, to use Mirrors#Sort your mirrors by their speed. Then sorting those 6 fastest mirrors, by their Mirror#Mirror status.

Simply visit either one or both Mirrors#Mirror status links and sort them by the ones that are more up to date. Move the more up to date mirror(s) to the top of Template:Filename and if the mirror(s) are way out of date simply don't use those; repeat the process leaving out the outdated mirror(s). So you end up with a total of 6 mirrors that are sorted by speed and status, leaving out outdated mirrors.

When having mirror issues the above should be repeated. Or repeat once in a while even if you don't have mirror issues, too keep Template:Filename up to date.

Official mirrors

Attention: Do not add new mirrors to the list below. If you want your mirror to be added to official list - file a feature request. In the meantime add it to the "Unofficial mirrors" list at the end of this page.

Australia

Austria

Belgium

Brazil

Canada

Czech Republic

Denmark

Estonia

France

Germany

Great Britain

Greece

Hungary

Ireland

Indonesia

Israel

Italy

Japan

Latvia

Lithuania

Netherlands

Norway

Poland

Portugal

Romania

Russia

Sweden

Switzerland

Taiwan

Turkey

Ukraine

United States

Venezuela

Vietnam

Unofficial mirrors

These mirrors are not listed in Template:Filename.

Global

Australia

Bulgaria

China

Germany

Great Britain

Lithuania

Malaysia

New Caledonia

New Zealand

Norway

Poland

South Africa

Spain

United States

IPv6-ready mirrors

  • http://power.klette.us/mirror/ (Norway)
  • http://arch.iskrembilen.com/ (Norway, rsync available)
  • niue.belnet.be (Belgium)
  • ftp.estpak.ee (Estonia)
  • patroklos.noc.ntua.gr (Greece)
  • ftp.heanet.ie (Ireland)
  • ftp.nluug.nl (Netherlands)
  • ftp.surfnet.nl (Netherlands)
  • ftp.sixnix.net/ftp6.sixnix.net (Finland) - dead