Difference between revisions of "Mirrors"
(→Unofficial mirrors: Added mirror in France.) |
m (→Global: SourceForge "mirror" is severely out of date) |
||
(41 intermediate revisions by 25 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:About Arch | + | [[Category:About Arch]] [[Category:Package management]] |
− | + | [[es:Mirrors]] | |
[[fr:Miroirs]] | [[fr:Miroirs]] | ||
+ | [[it:Mirrors]] | ||
+ | [[ja:Mirrors]] | ||
+ | [[zh-CN:Mirrors]] | ||
{{Article summary start|Summary}} | {{Article summary start|Summary}} | ||
{{Article summary text|Updating and managing package mirrors}} | {{Article summary text|Updating and managing package mirrors}} | ||
{{Article summary heading|Related}} | {{Article summary heading|Related}} | ||
+ | {{Article summary wiki|Mirroring}} | ||
{{Article summary wiki|pacman}} | {{Article summary wiki|pacman}} | ||
{{Article summary wiki|reflector}} | {{Article summary wiki|reflector}} | ||
Line 14: | Line 18: | ||
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use. | To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use. | ||
− | {{Note | ftp.archlinux.org is [ | + | {{Note | ftp.archlinux.org is [https://www.archlinux.org/news/throttling-ftparchlinuxorg-rsyncarchlinuxorg/ throttled at 50KB/s].}} |
+ | Example: | ||
# Any | # Any | ||
Line 38: | Line 43: | ||
==Mirror status== | ==Mirror status== | ||
− | Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or | + | Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or https://www.archlinux.org/mirrors/status/. |
− | You can generate an up to date mirrorlist [ | + | You can generate an up to date mirrorlist [https://www.archlinux.org/mirrorlist/ here], automate the process with a [[#Script to automate use of Pacman Mirrorlist Generator|script]], or install [[Reflector]], a utility that generates a mirrorlist using Mirrorcheck's list; you can also manually check how up-to-date a mirror is by: |
#picking a server and browsing to "extra/os/"; | #picking a server and browsing to "extra/os/"; | ||
− | #accessing | + | #accessing https://www.archlinux.org/ in another browser tab or window; and |
#comparing the last-modified date of the {{ic|i686}} directory on the mirror to the ''[extra]'' date on the homepage, in the ''Package Repositories'' box to the right. | #comparing the last-modified date of the {{ic|i686}} directory on the mirror to the ''[extra]'' date on the homepage, in the ''Package Repositories'' box to the right. | ||
Line 50: | Line 55: | ||
===List by speed=== | ===List by speed=== | ||
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}. | Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}. | ||
− | |||
− | |||
− | |||
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}: | Back up the existing {{ic|/etc/pacman.d/mirrorlist}}: | ||
Line 80: | Line 82: | ||
When having mirror issues the above should be repeated. Or repeat once in a while even if not having mirror problems, to keep {{ic|/etc/pacman.d/mirrorlist}} up to date. | When having mirror issues the above should be repeated. Or repeat once in a while even if not having mirror problems, to keep {{ic|/etc/pacman.d/mirrorlist}} up to date. | ||
− | ===Script to automate use of Pacman Mirrorlist Generator=== | + | === Script to automate use of Pacman Mirrorlist Generator === |
− | You can use the following shell script to update your mirrors based on the rankings produced by the [ | + | |
+ | You can use the following shell script to update your mirrors based on the rankings produced by the [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. If you do not live in the United States, you can change the {{ic|country}} variable. | ||
− | {{hc|updatemirrors.sh| | + | {{hc|updatemirrors.sh|<nowiki> |
+ | #!/bin/sh | ||
[ "$UID" != 0 ] && su=sudo | [ "$UID" != 0 ] && su=sudo | ||
− | country=' | + | country='US' |
− | url=" | + | url="https://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on" |
tmpfile=$(mktemp --suffix=-mirrorlist) | tmpfile=$(mktemp --suffix=-mirrorlist) | ||
Line 95: | Line 99: | ||
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile" | wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile" | ||
− | # Backup and replace current mirrorlist file | + | # Backup and replace current mirrorlist file (if new file is non-zero) |
− | { echo "Backing up the original mirrorlist..." | + | if [ -s "$tmpfile" ] |
− | + | then | |
− | { echo "Rotating the new list into place..." | + | { echo " Backing up the original mirrorlist..." |
− | + | $su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } && | |
+ | { echo " Rotating the new list into place..." | ||
+ | $su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; } | ||
+ | else | ||
+ | echo " Unable to update, could not download list." | ||
+ | fi | ||
+ | |||
+ | # allow global read access (required for non-root yaourt execution) | ||
+ | chmod +r /etc/pacman.d/mirrorlist</nowiki>}} | ||
+ | |||
{{Note|You will need to copy the text above, place it into a file, and run {{Ic|chmod +x}} on the file. If you are not currently logged in as root, the script will invoke sudo for you when it needs to rotate the new mirrorlist into place.}} | {{Note|You will need to copy the text above, place it into a file, and run {{Ic|chmod +x}} on the file. If you are not currently logged in as root, the script will invoke sudo for you when it needs to rotate the new mirrorlist into place.}} | ||
Line 105: | Line 118: | ||
===Using Reflector=== | ===Using Reflector=== | ||
− | Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [ | + | Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [https://www.archlinux.org/mirrors/status/ MirrorStatus] page, filter the most up-to-date mirrors, sort them by speed and overwrite the file {{ic|/etc/pacman.d/mirrorlist}}. |
==Official mirrors== | ==Official mirrors== | ||
Line 115: | Line 128: | ||
Be sure to uncomment a preferred mirror as described above, then: | Be sure to uncomment a preferred mirror as described above, then: | ||
# pacman -Syy | # pacman -Syy | ||
− | # pacman - | + | # pacman -S --force pacman-mirrorlist |
If you want your mirror to be added to the official list, file a feature request. In the meantime, add it to the [[#Unofficial mirrors]] list at the end of this page. | If you want your mirror to be added to the official list, file a feature request. In the meantime, add it to the [[#Unofficial mirrors]] list at the end of this page. | ||
Line 123: | Line 136: | ||
{{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}} | {{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}} | ||
+ | |||
+ | ===IPv6-ready mirrors=== | ||
+ | |||
+ | The [https://www.archlinux.org/mirrorlist/?country=all&protocol=http&ip_version=6 pacman mirror list generator] can also be used to find a list of current IPv6 mirrors. | ||
==Unofficial mirrors== | ==Unofficial mirrors== | ||
Line 128: | Line 145: | ||
===Global=== | ===Global=== | ||
− | * http://sourceforge.net/projects/archlinux/files/ - ''Does not have | + | * http://sourceforge.net/projects/archlinux/files/ - ''ISO files only; Does not have any releases since 2006. Use it only if for getting older ISOs.'' |
+ | |||
+ | ===TOR Network=== | ||
+ | *http://cz2jqg7pj2hqanw7.onion/archlinux | ||
+ | *ftp://mirror:mirror@cz2jqg7pj2hqanw7.onion/archlinux | ||
+ | |||
+ | ===Singapore=== | ||
+ | *http://mirror.nus.edu.sg/archlinux/ | ||
===Bulgaria=== | ===Bulgaria=== | ||
Line 157: | Line 181: | ||
===France=== | ===France=== | ||
*http://delta.archlinux.fr/ - ''With Delta package support. Needs xdelta3 package from extra to run.'' | *http://delta.archlinux.fr/ - ''With Delta package support. Needs xdelta3 package from extra to run.'' | ||
+ | *http://mirror.soa1.org/archlinux | ||
+ | *ftp://mirror:mirror@mirror.soa1.org/archlinux | ||
===Germany=== | ===Germany=== | ||
Line 163: | Line 189: | ||
*http://ftp.u-tx.net/archlinux/ | *http://ftp.u-tx.net/archlinux/ | ||
*ftp://ftp.u-tx.net/archlinux/ | *ftp://ftp.u-tx.net/archlinux/ | ||
+ | *http://mirror.michael-eckert.net/archlinux/ | ||
+ | *http://linux.rz.rub.de/archlinux/ | ||
===Indonesia=== | ===Indonesia=== | ||
Line 191: | Line 219: | ||
===Russia=== | ===Russia=== | ||
*http://hatred.homelinux.net/archlinux/ - ''Vladivostok, without iso, with <sub>[http://hatred.homelinux.net/wiki/proekty:3spy:start 3SPY]</sub> project repos and [http://hatred.homelinux.net/archlinux/mingw32/os/i686 '''mingw32'''] repo'' | *http://hatred.homelinux.net/archlinux/ - ''Vladivostok, without iso, with <sub>[http://hatred.homelinux.net/wiki/proekty:3spy:start 3SPY]</sub> project repos and [http://hatred.homelinux.net/archlinux/mingw32/os/i686 '''mingw32'''] repo'' | ||
+ | *http://mirrors.krasinfo.ru/archlinux/ - ''Krasnoyarsk, Classica-Service Ltd'' | ||
===South Africa=== | ===South Africa=== | ||
Line 197: | Line 226: | ||
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town'' | *http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town'' | ||
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/ | *ftp://ftp.leg.uct.ac.za/pub/linux/arch/ | ||
+ | *http://mirror.ufs.ac.za/archlinux/ - ''University of the Free State'' | ||
+ | *ftp://mirror.ufs.ac.za/os/linux/distros/archlinux/ | ||
+ | *http://ftp.wa.co.za/pub/archlinux/ - ''Web Africa Networks'' | ||
+ | *ftp://ftp.wa.co.za/pub/archlinux/ | ||
+ | *http://archlinux.mirror.ac.za - ''TENET - Tertiary Education and Research Network of South Africa'' | ||
+ | *ftp://archlinux.mirror.ac.za | ||
===United States=== | ===United States=== | ||
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19'' | * http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19'' | ||
* http://mirror.pointysoftware.net/archlinux/ | * http://mirror.pointysoftware.net/archlinux/ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Troubleshooting== | ==Troubleshooting== | ||
Line 252: | Line 273: | ||
-e 's,/\(community\)/,/\1-testing/,') | -e 's,/\(community\)/,/\1-testing/,') | ||
</nowiki>}} | </nowiki>}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See Also == | == See Also == | ||
− | * | + | * [http://wiki.gotux.net/code/bash/mirup MirUp] – pacman mirrorlist downloader/checker |
Revision as of 01:58, 20 February 2013
zh-CN:Mirrors Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.
Contents
Enabling a specific mirror
To enable mirrors, open /etc/pacman.d/mirrorlist
and locate your geographic region. Uncomment mirrors you would like to use.
Example:
# Any # Server = ftp://mirrors.kernel.org/archlinux/$repo/os/$arch Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch
See #Mirror status and #List by speed for tools that help choosing mirrors.
It is also possible to specify mirrors in /etc/pacman.conf
. For the [core] repository, the default setup is:
[core] Include = /etc/pacman.d/mirrorlist
To use the HostEurope mirror as a default mirror, add it before the Include
line:
[core] Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch Include = /etc/pacman.d/mirrorlist
pacman will now try to connect to this mirror first. Proceed to do the same for [testing], [extra], and [community], if applicable.
pacman.conf
, remember to use the same mirror for all repositories. Otherwise packages that are incompatible to each other may be installed, like linux from [core] and an older kernel module from [extra].Mirror status
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or https://www.archlinux.org/mirrors/status/.
You can generate an up to date mirrorlist here, automate the process with a script, or install Reflector, a utility that generates a mirrorlist using Mirrorcheck's list; you can also manually check how up-to-date a mirror is by:
- picking a server and browsing to "extra/os/";
- accessing https://www.archlinux.org/ in another browser tab or window; and
- comparing 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.
Sorting mirrors
If not using reflector, which has the ability to sort mirrors by both how updated they are and their speed, follow this demonstration of manual mirror sorting.
List by speed
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, /usr/bin/rankmirrors
.
Back up the existing /etc/pacman.d/mirrorlist
:
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
Edit /etc/pacman.d/mirrorlist.backup
and uncomment mirrors for testing with rankmirrors
.
Optionally run the following sed
line to uncomment every mirror:
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup
Finally, rank the mirrors. Operand -n 6
means only output the 6 fastest mirrors:
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist
Run rankmirrors -h
for a list of all the available options.
Force pacman to refresh the package lists
After creating/editing /etc/pacman.d/mirrorlist
, (manually or by using rankmirrors
) issue the following command:
# pacman -Syy
--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 changing to a new mirror is good practice and will avoid possible issues.Combined listing by speed and status
It is not a good idea to just use the fastest mirrors, since the fastest mirrors might be out of date. The preferred way would be to use #List by speed, then sorting those 6 fastest mirrors by their #Mirror status.
Simply visit either one or both #Mirror status links and sort them by the ones that are more up to date. Move the more up to date mirrors to the top of /etc/pacman.d/mirrorlist
and if the mirrors are way out of date simply do not use those; repeat the process leaving out the outdated mirrors. So this ends 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 not having mirror problems, to keep /etc/pacman.d/mirrorlist
up to date.
Script to automate use of Pacman Mirrorlist Generator
You can use the following shell script to update your mirrors based on the rankings produced by the Pacman Mirrorlist Generator. If you do not live in the United States, you can change the country
variable.
updatemirrors.sh
#!/bin/sh [ "$UID" != 0 ] && su=sudo country='US' url="https://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on" tmpfile=$(mktemp --suffix=-mirrorlist) # Get latest mirror list and save to tmpfile wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile" # Backup and replace current mirrorlist file (if new file is non-zero) if [ -s "$tmpfile" ] then { echo " Backing up the original mirrorlist..." $su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } && { echo " Rotating the new list into place..." $su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; } else echo " Unable to update, could not download list." fi # allow global read access (required for non-root yaourt execution) chmod +r /etc/pacman.d/mirrorlist
chmod +x
on the file. If you are not currently logged in as root, the script will invoke sudo for you when it needs to rotate the new mirrorlist into place.Using Reflector
Alternatively, you can use Reflector to automatically retrieve the latest mirrorlist from the MirrorStatus page, filter the most up-to-date mirrors, sort them by speed and overwrite the file /etc/pacman.d/mirrorlist
.
Official mirrors
The official Arch Linux mirror list is available from the pacman-mirrorlist package. To get an even more up-to-date list of mirrors, use the Pacman Mirror List Generator page on the main site.
In the unlikely scenario that you are without any configured mirrors and pacman-mirrorlist
is not installed, run the following command:
# wget -O /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/
Be sure to uncomment a preferred mirror as described above, then:
# pacman -Syy # pacman -S --force pacman-mirrorlist
If you want your mirror to be added to the official list, file a feature request. In the meantime, add it to the #Unofficial mirrors list at the end of this page.
If you get an error stating that the $arch
variable is used but not defined, add the following to your /etc/pacman.conf
:
Architecture = x86_64
auto
and i686
for the Architecture
variable.IPv6-ready mirrors
The pacman mirror list generator can also be used to find a list of current IPv6 mirrors.
Unofficial mirrors
These mirrors are not listed in /etc/pacman.d/mirrorlist
.
Global
- http://sourceforge.net/projects/archlinux/files/ - ISO files only; Does not have any releases since 2006. Use it only if for getting older ISOs.
TOR Network
Singapore
Bulgaria
Viet Nam
FPT TELECOM
China
CHINA TELECOM
CHINA UNICOM
Cernet
- http://ftp.sjtu.edu.cn/archlinux/ - Shanghai Jiaotong University
- ftp://ftp.sjtu.edu.cn/archlinux/
- http://mirrors.ustc.edu.cn/archlinux/ - University of Science and Technology of China
- ftp://mirrors.ustc.edu.cn/archlinux/
- http://mirrors.tuna.tsinghua.edu.cn/archlinux/ - Tsinghua University
- http://mirrors.4.tuna.tsinghua.edu.cn/archlinux/ (ipv4 only)
- http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ (ipv6 only)
- http://mirror.lzu.edu.cn/archlinux/ - Lanzhou University
France
- http://delta.archlinux.fr/ - With Delta package support. Needs xdelta3 package from extra to run.
- http://mirror.soa1.org/archlinux
- ftp://mirror:mirror@mirror.soa1.org/archlinux
Germany
- http://ftp.uni-erlangen.de/mirrors/archlinux/
- ftp://ftp.uni-erlangen.de/mirrors/archlinux/
- http://ftp.u-tx.net/archlinux/
- ftp://ftp.u-tx.net/archlinux/
- http://mirror.michael-eckert.net/archlinux/
- http://linux.rz.rub.de/archlinux/
Indonesia
- http://mirror.kavalinux.com/archlinux/ - only from Indonesia
- http://kambing.ui.ac.id/archlinux/
- http://repo.ukdw.ac.id/archlinux/
Kazakhstan
Lithuania
- http://edacval.homelinux.org/mirrors/archlinux/ - Only from LT, without ISO
Malaysia
New Zealand
Poland
- ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
- http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
- rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
Russia
- http://hatred.homelinux.net/archlinux/ - Vladivostok, without iso, with 3SPY project repos and mingw32 repo
- http://mirrors.krasinfo.ru/archlinux/ - Krasnoyarsk, Classica-Service Ltd
South Africa
- http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - Stellenbosch University
- ftp://ftp.sun.ac.za/pub/mirrors/archlinux/
- http://ftp.leg.uct.ac.za/pub/linux/arch/ - University of Cape Town
- ftp://ftp.leg.uct.ac.za/pub/linux/arch/
- http://mirror.ufs.ac.za/archlinux/ - University of the Free State
- ftp://mirror.ufs.ac.za/os/linux/distros/archlinux/
- http://ftp.wa.co.za/pub/archlinux/ - Web Africa Networks
- ftp://ftp.wa.co.za/pub/archlinux/
- http://archlinux.mirror.ac.za - TENET - Tertiary Education and Research Network of South Africa
- ftp://archlinux.mirror.ac.za
United States
- http://archlinux.linuxfreedom.com - Contains numerous ISO images but does not contain the ISO dated 2011.08.19
- http://mirror.pointysoftware.net/archlinux/
Troubleshooting
Out-of-sync mirrors: corrupted packages/file not found
Issues regarding out-of-sync mirrors pointed out in this news post may have already been sorted out for most users, but in the event that problems of this nature present themselves again, simply try to see if the packages are present in the [testing] repository.
After having synced with pacman -Sy
, use this command:
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \ -e 's,/\(community\)/,/\1-testing/,')
Doing so could help in any occasion where packages in the mirror have not been synced to [core] or [extra], and are still residing in [testing]. It is perfectly safe to install from [testing] in this case since the packages are being matched by version and release numbers.
In any event, it is best to switch mirrors and sync with pacman -Syy
than resorting to an alternate repository. However, all or some of the mirrors may at times be out-of-sync to some degree.
Using all mirrors
To emulate pacman -Su
's behavior of going through the entire mirror list, use this script:
~/bin/pacup
#!/bin/bash # Pacman will not exit on the first error. Comment the line below to # try from [testing] directly. pacman -Su "$@" && exit while read -r pkg; do if pacman -Ud "$pkg"; then continue else while read -r mirror; do pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") && break done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \ </etc/pacman.d/mirrorlist | tail -n +2 ) fi done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \ -e 's,/\(community\)/,/\1-testing/,')
See Also
- MirUp – pacman mirrorlist downloader/checker