https://wiki.archlinux.org/api.php?action=feedcontributions&user=Rzm&feedformat=atomArchWiki - User contributions [en]2024-03-29T10:23:31ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Mirrors&diff=176222Mirrors2011-12-29T18:09:03Z<p>Rzm: /* Poland */</p>
<hr />
<div>[[Category:About Arch (English)]] [[Category:Package management (English)]] <br />
{{i18n|Mirrors}}<br />
[[fr:Miroirs]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Updating and managing package mirrors}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
{{Note | ftp.archlinux.org is [http://www.archlinux.org/news/302/ throttled at 50KB/s]}} Example:<br />
<br />
# Any<br />
# Server = <nowiki>ftp://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.<br />
<br />
{{Tip|Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{Ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|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]''.}}<br />
<br />
==Mirror status==<br />
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or http://www.archlinux.org/mirrors/status/.<br />
<br />
You can generate an up to date mirrorlist [http://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:<br />
#picking a server and browsing to "extra/os/";<br />
#accessing http://www.archlinux.org/ in another browser tab or window; and<br />
#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.<br />
<br />
==Sorting mirrors==<br />
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.<br />
<br />
===List by speed===<br />
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}.<br />
<br />
Use {{Ic|cd}} to switch to the {{ic|/etc/pacman.d}} directory:<br />
# cd /etc/pacman.d<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.<br />
<br />
Optionally run the following {{Ic|sed}} line to uncomment every mirror:<br />
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup<br />
<br />
Finally, rank the mirrors. Operand {{Ic|-n 6}} means only output the 6 fastest mirrors: <br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
Run {{Ic|rankmirrors -h}} for a list of all the available options.<br />
<br />
'''Force pacman to refresh the package lists'''<br><br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{Ic|rankmirrors}}) issue the following command:<br />
# pacman -Syy<br />
<br />
{{Tip|Passing two {{Ic|--refresh}} or {{Ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{Ic|pacman -Syy}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues.}}<br />
<br />
===Combined listing by speed and status===<br />
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]]. <br />
<br />
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 {{ic|/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. <br />
<br />
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.<br />
<br />
===Script to automate use of Pacman Mirrorlist Generator===<br />
You can use the following shell script to update your mirrors based on the rankings produced by the [http://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. If you do not live in the United States, you can change the country variable.<br />
<br />
{{hc|updatemirrors.sh|2=<nowiki>#!/bin/sh<br />
<br />
[ "$UID" != 0 ] && su=sudo<br />
<br />
country='United+States'<br />
url="http://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on"<br />
<br />
tmpfile=$(mktemp --suffix=-mirrorlist)<br />
<br />
# Get latest mirror list and save to tmpfile<br />
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile"<br />
<br />
# Backup and replace current mirrorlist file<br />
{ echo "Backing up the original mirrorlist..."<br />
$su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } &&<br />
{ echo "Rotating the new list into place..."<br />
$su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; }</nowiki>}}<br />
<br />
{{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.}}<br />
<br />
===Using Reflector===<br />
<br />
Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [http://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}}.<br />
<br />
==Official mirrors==<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirror List Generator] page on the main site.<br />
<br />
In the unlikely scenario that you are without any configured mirrors and {{Ic|pacman-mirrorlist}} is not installed, run the following command:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syy<br />
# pacman -Sf pacman-mirrorlist<br />
<br />
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.<br />
<br />
If you get an error stating that the {{ic|$arch}} variable is used but not defined, add the following to your {{ic|/etc/pacman.conf}}:<br />
Architecture = x86_64<br />
<br />
{{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}}<br />
<br />
==Unofficial mirrors==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===Global===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===Bulgaria===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===China===<br />
# CHINA TELECOM<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
# Cernet<br />
*http://ftp.sjtu.edu.cn/archlinux/<br />
*http://mirror.bjtu.edu.cn/archlinux/<br />
<br />
===Germany===<br />
*http://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*http://ftp.u-tx.net/archlinux/<br />
*ftp://ftp.u-tx.net/archlinux/<br />
<br />
===Indonesia===<br />
*http://mirror.kavalinux.com/archlinux/ - ''only from Indonesia''<br />
*http://kambing.ui.ac.id/archlinux/<br />
*http://repo.ukdw.ac.id/archlinux/<br />
<br />
===Lithuania===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===Malaysia===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===New Zealand===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
===Poland===<br />
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
*http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
*rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
<br />
===Russia===<br />
*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''<br />
<br />
===South Africa===<br />
*http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - ''Stellenbosch University''<br />
*ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
===United States===<br />
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19''<br />
* http://mirror.pointysoftware.net/archlinux/<br />
<br />
==IPv6-ready mirrors==<br />
*ftp.free.fr (France)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*http://mirror6.bjtu.edu.cn/archlinux (China)<br />
*http://mirrors.inetutils.net/archlinux/ (Malaysia)<br />
*http://mirror.ece.vt.edu/archlinux/ (Virginia, US)<br />
*ftp://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*http://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*rsync://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
<br />
==Troubleshooting==<br />
<br />
===Out-of-sync mirrors: corrupted packages/file not found===<br />
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... --><br />
Issues regarding out-of-sync mirrors pointed out in [https://www.archlinux.org/news/482/ 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.<br />
<br />
After having synced with {{Ic|pacman -Sy}}, use this command:<br />
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
<br />
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.<br />
<br />
In any event, it is best to switch mirrors and sync with {{Ic|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.<br />
<br />
====Using all mirrors====<br />
To emulate {{Ic|pacman -Su}}'s behavior of going through the entire mirror list, use this script:<br />
{{hc|~/bin/pacup|<nowiki><br />
#!/bin/bash<br />
<br />
# Pacman will not exit on the first error. Comment the line below to<br />
# try from [testing] directly.<br />
pacman -Su "$@" && exit<br />
<br />
while read -r pkg; do<br />
if pacman -Ud "$pkg"; then<br />
continue<br />
else<br />
while read -r mirror; do<br />
pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") &&<br />
break<br />
done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \<br />
</etc/pacman.d/mirrorlist | tail -n +2 )<br />
fi<br />
done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
</nowiki>}}<br />
<br />
===Checking multiple mirrors with paccheck===<br />
The paccheck script can be used:<br />
* to compare pacman sync databases and package desc files to different mirrors,<br />
* to verify size of packages in pacman cache<br />
* to optionally compare packages in pacman cache to selected mirror(s).<br />
<br />
The script is intended to help to detect compromised mirrors, before the official implementation of [[package signing]]. It is destined for those who may want a little more assurance against some possible hacking scenarios of mirror servers.<br />
<br />
The Full System Update Procedure is:<br />
# Run ''paccheck'' as a non-root user. Pacman will be synchronised and the needed packages will be downloaded.<br />
# Examine report<br />
# If no package ''mismatch'', then run {{ic|pacman -Su}} as root to update your system<br />
<br />
The script can be found in the [[Arch User Repository|AUR]]: {{AUR|paccheck}}<br />
<br />
== See Also ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>Rzmhttps://wiki.archlinux.org/index.php?title=Mirrors&diff=176221Mirrors2011-12-29T18:08:27Z<p>Rzm: /* Poland */ ICM UW</p>
<hr />
<div>[[Category:About Arch (English)]] [[Category:Package management (English)]] <br />
{{i18n|Mirrors}}<br />
[[fr:Miroirs]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Updating and managing package mirrors}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
{{Note | ftp.archlinux.org is [http://www.archlinux.org/news/302/ throttled at 50KB/s]}} Example:<br />
<br />
# Any<br />
# Server = <nowiki>ftp://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.<br />
<br />
{{Tip|Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{Ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|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]''.}}<br />
<br />
==Mirror status==<br />
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or http://www.archlinux.org/mirrors/status/.<br />
<br />
You can generate an up to date mirrorlist [http://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:<br />
#picking a server and browsing to "extra/os/";<br />
#accessing http://www.archlinux.org/ in another browser tab or window; and<br />
#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.<br />
<br />
==Sorting mirrors==<br />
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.<br />
<br />
===List by speed===<br />
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}.<br />
<br />
Use {{Ic|cd}} to switch to the {{ic|/etc/pacman.d}} directory:<br />
# cd /etc/pacman.d<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.<br />
<br />
Optionally run the following {{Ic|sed}} line to uncomment every mirror:<br />
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup<br />
<br />
Finally, rank the mirrors. Operand {{Ic|-n 6}} means only output the 6 fastest mirrors: <br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
Run {{Ic|rankmirrors -h}} for a list of all the available options.<br />
<br />
'''Force pacman to refresh the package lists'''<br><br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{Ic|rankmirrors}}) issue the following command:<br />
# pacman -Syy<br />
<br />
{{Tip|Passing two {{Ic|--refresh}} or {{Ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{Ic|pacman -Syy}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues.}}<br />
<br />
===Combined listing by speed and status===<br />
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]]. <br />
<br />
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 {{ic|/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. <br />
<br />
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.<br />
<br />
===Script to automate use of Pacman Mirrorlist Generator===<br />
You can use the following shell script to update your mirrors based on the rankings produced by the [http://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. If you do not live in the United States, you can change the country variable.<br />
<br />
{{hc|updatemirrors.sh|2=<nowiki>#!/bin/sh<br />
<br />
[ "$UID" != 0 ] && su=sudo<br />
<br />
country='United+States'<br />
url="http://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on"<br />
<br />
tmpfile=$(mktemp --suffix=-mirrorlist)<br />
<br />
# Get latest mirror list and save to tmpfile<br />
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile"<br />
<br />
# Backup and replace current mirrorlist file<br />
{ echo "Backing up the original mirrorlist..."<br />
$su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } &&<br />
{ echo "Rotating the new list into place..."<br />
$su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; }</nowiki>}}<br />
<br />
{{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.}}<br />
<br />
===Using Reflector===<br />
<br />
Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [http://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}}.<br />
<br />
==Official mirrors==<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirror List Generator] page on the main site.<br />
<br />
In the unlikely scenario that you are without any configured mirrors and {{Ic|pacman-mirrorlist}} is not installed, run the following command:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syy<br />
# pacman -Sf pacman-mirrorlist<br />
<br />
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.<br />
<br />
If you get an error stating that the {{ic|$arch}} variable is used but not defined, add the following to your {{ic|/etc/pacman.conf}}:<br />
Architecture = x86_64<br />
<br />
{{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}}<br />
<br />
==Unofficial mirrors==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===Global===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===Bulgaria===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===China===<br />
# CHINA TELECOM<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
# Cernet<br />
*http://ftp.sjtu.edu.cn/archlinux/<br />
*http://mirror.bjtu.edu.cn/archlinux/<br />
<br />
===Germany===<br />
*http://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*http://ftp.u-tx.net/archlinux/<br />
*ftp://ftp.u-tx.net/archlinux/<br />
<br />
===Indonesia===<br />
*http://mirror.kavalinux.com/archlinux/ - ''only from Indonesia''<br />
*http://kambing.ui.ac.id/archlinux/<br />
*http://repo.ukdw.ac.id/archlinux/<br />
<br />
===Lithuania===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===Malaysia===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===New Zealand===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
===Poland===<br />
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ ICM UW<br />
*http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
*rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
<br />
===Russia===<br />
*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''<br />
<br />
===South Africa===<br />
*http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - ''Stellenbosch University''<br />
*ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
===United States===<br />
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19''<br />
* http://mirror.pointysoftware.net/archlinux/<br />
<br />
==IPv6-ready mirrors==<br />
*ftp.free.fr (France)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*http://mirror6.bjtu.edu.cn/archlinux (China)<br />
*http://mirrors.inetutils.net/archlinux/ (Malaysia)<br />
*http://mirror.ece.vt.edu/archlinux/ (Virginia, US)<br />
*ftp://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*http://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*rsync://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
<br />
==Troubleshooting==<br />
<br />
===Out-of-sync mirrors: corrupted packages/file not found===<br />
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... --><br />
Issues regarding out-of-sync mirrors pointed out in [https://www.archlinux.org/news/482/ 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.<br />
<br />
After having synced with {{Ic|pacman -Sy}}, use this command:<br />
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
<br />
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.<br />
<br />
In any event, it is best to switch mirrors and sync with {{Ic|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.<br />
<br />
====Using all mirrors====<br />
To emulate {{Ic|pacman -Su}}'s behavior of going through the entire mirror list, use this script:<br />
{{hc|~/bin/pacup|<nowiki><br />
#!/bin/bash<br />
<br />
# Pacman will not exit on the first error. Comment the line below to<br />
# try from [testing] directly.<br />
pacman -Su "$@" && exit<br />
<br />
while read -r pkg; do<br />
if pacman -Ud "$pkg"; then<br />
continue<br />
else<br />
while read -r mirror; do<br />
pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") &&<br />
break<br />
done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \<br />
</etc/pacman.d/mirrorlist | tail -n +2 )<br />
fi<br />
done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
</nowiki>}}<br />
<br />
===Checking multiple mirrors with paccheck===<br />
The paccheck script can be used:<br />
* to compare pacman sync databases and package desc files to different mirrors,<br />
* to verify size of packages in pacman cache<br />
* to optionally compare packages in pacman cache to selected mirror(s).<br />
<br />
The script is intended to help to detect compromised mirrors, before the official implementation of [[package signing]]. It is destined for those who may want a little more assurance against some possible hacking scenarios of mirror servers.<br />
<br />
The Full System Update Procedure is:<br />
# Run ''paccheck'' as a non-root user. Pacman will be synchronised and the needed packages will be downloaded.<br />
# Examine report<br />
# If no package ''mismatch'', then run {{ic|pacman -Su}} as root to update your system<br />
<br />
The script can be found in the [[Arch User Repository|AUR]]: {{AUR|paccheck}}<br />
<br />
== See Also ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>Rzmhttps://wiki.archlinux.org/index.php?title=Mirrors&diff=176220Mirrors2011-12-29T18:04:44Z<p>Rzm: /* IPv6-ready mirrors */ Poland, 3 protocols</p>
<hr />
<div>[[Category:About Arch (English)]] [[Category:Package management (English)]] <br />
{{i18n|Mirrors}}<br />
[[fr:Miroirs]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Updating and managing package mirrors}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
{{Note | ftp.archlinux.org is [http://www.archlinux.org/news/302/ throttled at 50KB/s]}} Example:<br />
<br />
# Any<br />
# Server = <nowiki>ftp://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.<br />
<br />
{{Tip|Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{Ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|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]''.}}<br />
<br />
==Mirror status==<br />
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or http://www.archlinux.org/mirrors/status/.<br />
<br />
You can generate an up to date mirrorlist [http://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:<br />
#picking a server and browsing to "extra/os/";<br />
#accessing http://www.archlinux.org/ in another browser tab or window; and<br />
#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.<br />
<br />
==Sorting mirrors==<br />
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.<br />
<br />
===List by speed===<br />
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}.<br />
<br />
Use {{Ic|cd}} to switch to the {{ic|/etc/pacman.d}} directory:<br />
# cd /etc/pacman.d<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.<br />
<br />
Optionally run the following {{Ic|sed}} line to uncomment every mirror:<br />
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup<br />
<br />
Finally, rank the mirrors. Operand {{Ic|-n 6}} means only output the 6 fastest mirrors: <br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
Run {{Ic|rankmirrors -h}} for a list of all the available options.<br />
<br />
'''Force pacman to refresh the package lists'''<br><br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{Ic|rankmirrors}}) issue the following command:<br />
# pacman -Syy<br />
<br />
{{Tip|Passing two {{Ic|--refresh}} or {{Ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{Ic|pacman -Syy}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues.}}<br />
<br />
===Combined listing by speed and status===<br />
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]]. <br />
<br />
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 {{ic|/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. <br />
<br />
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.<br />
<br />
===Script to automate use of Pacman Mirrorlist Generator===<br />
You can use the following shell script to update your mirrors based on the rankings produced by the [http://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. If you do not live in the United States, you can change the country variable.<br />
<br />
{{hc|updatemirrors.sh|2=<nowiki>#!/bin/sh<br />
<br />
[ "$UID" != 0 ] && su=sudo<br />
<br />
country='United+States'<br />
url="http://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on"<br />
<br />
tmpfile=$(mktemp --suffix=-mirrorlist)<br />
<br />
# Get latest mirror list and save to tmpfile<br />
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile"<br />
<br />
# Backup and replace current mirrorlist file<br />
{ echo "Backing up the original mirrorlist..."<br />
$su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } &&<br />
{ echo "Rotating the new list into place..."<br />
$su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; }</nowiki>}}<br />
<br />
{{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.}}<br />
<br />
===Using Reflector===<br />
<br />
Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [http://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}}.<br />
<br />
==Official mirrors==<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirror List Generator] page on the main site.<br />
<br />
In the unlikely scenario that you are without any configured mirrors and {{Ic|pacman-mirrorlist}} is not installed, run the following command:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syy<br />
# pacman -Sf pacman-mirrorlist<br />
<br />
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.<br />
<br />
If you get an error stating that the {{ic|$arch}} variable is used but not defined, add the following to your {{ic|/etc/pacman.conf}}:<br />
Architecture = x86_64<br />
<br />
{{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}}<br />
<br />
==Unofficial mirrors==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===Global===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===Bulgaria===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===China===<br />
# CHINA TELECOM<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
# Cernet<br />
*http://ftp.sjtu.edu.cn/archlinux/<br />
*http://mirror.bjtu.edu.cn/archlinux/<br />
<br />
===Germany===<br />
*http://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*http://ftp.u-tx.net/archlinux/<br />
*ftp://ftp.u-tx.net/archlinux/<br />
<br />
===Indonesia===<br />
*http://mirror.kavalinux.com/archlinux/ - ''only from Indonesia''<br />
*http://kambing.ui.ac.id/archlinux/<br />
*http://repo.ukdw.ac.id/archlinux/<br />
<br />
===Lithuania===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===Malaysia===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===New Zealand===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
===Poland===<br />
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
*http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
*rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
<br />
===Russia===<br />
*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''<br />
<br />
===South Africa===<br />
*http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - ''Stellenbosch University''<br />
*ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
===United States===<br />
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19''<br />
* http://mirror.pointysoftware.net/archlinux/<br />
<br />
==IPv6-ready mirrors==<br />
*ftp.free.fr (France)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*http://mirror6.bjtu.edu.cn/archlinux (China)<br />
*http://mirrors.inetutils.net/archlinux/ (Malaysia)<br />
*http://mirror.ece.vt.edu/archlinux/ (Virginia, US)<br />
*ftp://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*http://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*rsync://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
<br />
==Troubleshooting==<br />
<br />
===Out-of-sync mirrors: corrupted packages/file not found===<br />
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... --><br />
Issues regarding out-of-sync mirrors pointed out in [https://www.archlinux.org/news/482/ 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.<br />
<br />
After having synced with {{Ic|pacman -Sy}}, use this command:<br />
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
<br />
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.<br />
<br />
In any event, it is best to switch mirrors and sync with {{Ic|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.<br />
<br />
====Using all mirrors====<br />
To emulate {{Ic|pacman -Su}}'s behavior of going through the entire mirror list, use this script:<br />
{{hc|~/bin/pacup|<nowiki><br />
#!/bin/bash<br />
<br />
# Pacman will not exit on the first error. Comment the line below to<br />
# try from [testing] directly.<br />
pacman -Su "$@" && exit<br />
<br />
while read -r pkg; do<br />
if pacman -Ud "$pkg"; then<br />
continue<br />
else<br />
while read -r mirror; do<br />
pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") &&<br />
break<br />
done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \<br />
</etc/pacman.d/mirrorlist | tail -n +2 )<br />
fi<br />
done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
</nowiki>}}<br />
<br />
===Checking multiple mirrors with paccheck===<br />
The paccheck script can be used:<br />
* to compare pacman sync databases and package desc files to different mirrors,<br />
* to verify size of packages in pacman cache<br />
* to optionally compare packages in pacman cache to selected mirror(s).<br />
<br />
The script is intended to help to detect compromised mirrors, before the official implementation of [[package signing]]. It is destined for those who may want a little more assurance against some possible hacking scenarios of mirror servers.<br />
<br />
The Full System Update Procedure is:<br />
# Run ''paccheck'' as a non-root user. Pacman will be synchronised and the needed packages will be downloaded.<br />
# Examine report<br />
# If no package ''mismatch'', then run {{ic|pacman -Su}} as root to update your system<br />
<br />
The script can be found in the [[Arch User Repository|AUR]]: {{AUR|paccheck}}<br />
<br />
== See Also ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>Rzmhttps://wiki.archlinux.org/index.php?title=Mirrors&diff=176219Mirrors2011-12-29T18:02:44Z<p>Rzm: /* Poland */ typo</p>
<hr />
<div>[[Category:About Arch (English)]] [[Category:Package management (English)]] <br />
{{i18n|Mirrors}}<br />
[[fr:Miroirs]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Updating and managing package mirrors}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
{{Note | ftp.archlinux.org is [http://www.archlinux.org/news/302/ throttled at 50KB/s]}} Example:<br />
<br />
# Any<br />
# Server = <nowiki>ftp://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.<br />
<br />
{{Tip|Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{Ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|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]''.}}<br />
<br />
==Mirror status==<br />
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or http://www.archlinux.org/mirrors/status/.<br />
<br />
You can generate an up to date mirrorlist [http://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:<br />
#picking a server and browsing to "extra/os/";<br />
#accessing http://www.archlinux.org/ in another browser tab or window; and<br />
#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.<br />
<br />
==Sorting mirrors==<br />
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.<br />
<br />
===List by speed===<br />
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}.<br />
<br />
Use {{Ic|cd}} to switch to the {{ic|/etc/pacman.d}} directory:<br />
# cd /etc/pacman.d<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.<br />
<br />
Optionally run the following {{Ic|sed}} line to uncomment every mirror:<br />
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup<br />
<br />
Finally, rank the mirrors. Operand {{Ic|-n 6}} means only output the 6 fastest mirrors: <br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
Run {{Ic|rankmirrors -h}} for a list of all the available options.<br />
<br />
'''Force pacman to refresh the package lists'''<br><br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{Ic|rankmirrors}}) issue the following command:<br />
# pacman -Syy<br />
<br />
{{Tip|Passing two {{Ic|--refresh}} or {{Ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{Ic|pacman -Syy}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues.}}<br />
<br />
===Combined listing by speed and status===<br />
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]]. <br />
<br />
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 {{ic|/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. <br />
<br />
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.<br />
<br />
===Script to automate use of Pacman Mirrorlist Generator===<br />
You can use the following shell script to update your mirrors based on the rankings produced by the [http://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. If you do not live in the United States, you can change the country variable.<br />
<br />
{{hc|updatemirrors.sh|2=<nowiki>#!/bin/sh<br />
<br />
[ "$UID" != 0 ] && su=sudo<br />
<br />
country='United+States'<br />
url="http://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on"<br />
<br />
tmpfile=$(mktemp --suffix=-mirrorlist)<br />
<br />
# Get latest mirror list and save to tmpfile<br />
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile"<br />
<br />
# Backup and replace current mirrorlist file<br />
{ echo "Backing up the original mirrorlist..."<br />
$su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } &&<br />
{ echo "Rotating the new list into place..."<br />
$su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; }</nowiki>}}<br />
<br />
{{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.}}<br />
<br />
===Using Reflector===<br />
<br />
Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [http://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}}.<br />
<br />
==Official mirrors==<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirror List Generator] page on the main site.<br />
<br />
In the unlikely scenario that you are without any configured mirrors and {{Ic|pacman-mirrorlist}} is not installed, run the following command:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syy<br />
# pacman -Sf pacman-mirrorlist<br />
<br />
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.<br />
<br />
If you get an error stating that the {{ic|$arch}} variable is used but not defined, add the following to your {{ic|/etc/pacman.conf}}:<br />
Architecture = x86_64<br />
<br />
{{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}}<br />
<br />
==Unofficial mirrors==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===Global===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===Bulgaria===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===China===<br />
# CHINA TELECOM<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
# Cernet<br />
*http://ftp.sjtu.edu.cn/archlinux/<br />
*http://mirror.bjtu.edu.cn/archlinux/<br />
<br />
===Germany===<br />
*http://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*http://ftp.u-tx.net/archlinux/<br />
*ftp://ftp.u-tx.net/archlinux/<br />
<br />
===Indonesia===<br />
*http://mirror.kavalinux.com/archlinux/ - ''only from Indonesia''<br />
*http://kambing.ui.ac.id/archlinux/<br />
*http://repo.ukdw.ac.id/archlinux/<br />
<br />
===Lithuania===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===Malaysia===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===New Zealand===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
===Poland===<br />
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
*http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
*rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/<br />
<br />
===Russia===<br />
*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''<br />
<br />
===South Africa===<br />
*http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - ''Stellenbosch University''<br />
*ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
===United States===<br />
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19''<br />
* http://mirror.pointysoftware.net/archlinux/<br />
<br />
==IPv6-ready mirrors==<br />
*ftp.free.fr (France)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*http://mirror6.bjtu.edu.cn/archlinux (China)<br />
*http://mirrors.inetutils.net/archlinux/ (Malaysia)<br />
*http://mirror.ece.vt.edu/archlinux/ (Virginia, US)<br />
<br />
==Troubleshooting==<br />
<br />
===Out-of-sync mirrors: corrupted packages/file not found===<br />
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... --><br />
Issues regarding out-of-sync mirrors pointed out in [https://www.archlinux.org/news/482/ 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.<br />
<br />
After having synced with {{Ic|pacman -Sy}}, use this command:<br />
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
<br />
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.<br />
<br />
In any event, it is best to switch mirrors and sync with {{Ic|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.<br />
<br />
====Using all mirrors====<br />
To emulate {{Ic|pacman -Su}}'s behavior of going through the entire mirror list, use this script:<br />
{{hc|~/bin/pacup|<nowiki><br />
#!/bin/bash<br />
<br />
# Pacman will not exit on the first error. Comment the line below to<br />
# try from [testing] directly.<br />
pacman -Su "$@" && exit<br />
<br />
while read -r pkg; do<br />
if pacman -Ud "$pkg"; then<br />
continue<br />
else<br />
while read -r mirror; do<br />
pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") &&<br />
break<br />
done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \<br />
</etc/pacman.d/mirrorlist | tail -n +2 )<br />
fi<br />
done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
</nowiki>}}<br />
<br />
===Checking multiple mirrors with paccheck===<br />
The paccheck script can be used:<br />
* to compare pacman sync databases and package desc files to different mirrors,<br />
* to verify size of packages in pacman cache<br />
* to optionally compare packages in pacman cache to selected mirror(s).<br />
<br />
The script is intended to help to detect compromised mirrors, before the official implementation of [[package signing]]. It is destined for those who may want a little more assurance against some possible hacking scenarios of mirror servers.<br />
<br />
The Full System Update Procedure is:<br />
# Run ''paccheck'' as a non-root user. Pacman will be synchronised and the needed packages will be downloaded.<br />
# Examine report<br />
# If no package ''mismatch'', then run {{ic|pacman -Su}} as root to update your system<br />
<br />
The script can be found in the [[Arch User Repository|AUR]]: {{AUR|paccheck}}<br />
<br />
== See Also ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>Rzmhttps://wiki.archlinux.org/index.php?title=Mirrors&diff=176218Mirrors2011-12-29T18:01:55Z<p>Rzm: Poland</p>
<hr />
<div>[[Category:About Arch (English)]] [[Category:Package management (English)]] <br />
{{i18n|Mirrors}}<br />
[[fr:Miroirs]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Updating and managing package mirrors}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
{{Note | ftp.archlinux.org is [http://www.archlinux.org/news/302/ throttled at 50KB/s]}} Example:<br />
<br />
# Any<br />
# Server = <nowiki>ftp://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.<br />
<br />
{{Tip|Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{Ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|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]''.}}<br />
<br />
==Mirror status==<br />
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or http://www.archlinux.org/mirrors/status/.<br />
<br />
You can generate an up to date mirrorlist [http://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:<br />
#picking a server and browsing to "extra/os/";<br />
#accessing http://www.archlinux.org/ in another browser tab or window; and<br />
#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.<br />
<br />
==Sorting mirrors==<br />
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.<br />
<br />
===List by speed===<br />
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}.<br />
<br />
Use {{Ic|cd}} to switch to the {{ic|/etc/pacman.d}} directory:<br />
# cd /etc/pacman.d<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.<br />
<br />
Optionally run the following {{Ic|sed}} line to uncomment every mirror:<br />
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup<br />
<br />
Finally, rank the mirrors. Operand {{Ic|-n 6}} means only output the 6 fastest mirrors: <br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
Run {{Ic|rankmirrors -h}} for a list of all the available options.<br />
<br />
'''Force pacman to refresh the package lists'''<br><br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{Ic|rankmirrors}}) issue the following command:<br />
# pacman -Syy<br />
<br />
{{Tip|Passing two {{Ic|--refresh}} or {{Ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{Ic|pacman -Syy}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues.}}<br />
<br />
===Combined listing by speed and status===<br />
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]]. <br />
<br />
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 {{ic|/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. <br />
<br />
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.<br />
<br />
===Script to automate use of Pacman Mirrorlist Generator===<br />
You can use the following shell script to update your mirrors based on the rankings produced by the [http://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. If you do not live in the United States, you can change the country variable.<br />
<br />
{{hc|updatemirrors.sh|2=<nowiki>#!/bin/sh<br />
<br />
[ "$UID" != 0 ] && su=sudo<br />
<br />
country='United+States'<br />
url="http://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on"<br />
<br />
tmpfile=$(mktemp --suffix=-mirrorlist)<br />
<br />
# Get latest mirror list and save to tmpfile<br />
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile"<br />
<br />
# Backup and replace current mirrorlist file<br />
{ echo "Backing up the original mirrorlist..."<br />
$su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } &&<br />
{ echo "Rotating the new list into place..."<br />
$su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; }</nowiki>}}<br />
<br />
{{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.}}<br />
<br />
===Using Reflector===<br />
<br />
Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [http://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}}.<br />
<br />
==Official mirrors==<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirror List Generator] page on the main site.<br />
<br />
In the unlikely scenario that you are without any configured mirrors and {{Ic|pacman-mirrorlist}} is not installed, run the following command:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syy<br />
# pacman -Sf pacman-mirrorlist<br />
<br />
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.<br />
<br />
If you get an error stating that the {{ic|$arch}} variable is used but not defined, add the following to your {{ic|/etc/pacman.conf}}:<br />
Architecture = x86_64<br />
<br />
{{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}}<br />
<br />
==Unofficial mirrors==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===Global===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===Bulgaria===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===China===<br />
# CHINA TELECOM<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
# Cernet<br />
*http://ftp.sjtu.edu.cn/archlinux/<br />
*http://mirror.bjtu.edu.cn/archlinux/<br />
<br />
===Germany===<br />
*http://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*http://ftp.u-tx.net/archlinux/<br />
*ftp://ftp.u-tx.net/archlinux/<br />
<br />
===Indonesia===<br />
*http://mirror.kavalinux.com/archlinux/ - ''only from Indonesia''<br />
*http://kambing.ui.ac.id/archlinux/<br />
*http://repo.ukdw.ac.id/archlinux/<br />
<br />
===Lithuania===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===Malaysia===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===New Zealand===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
===Poland===<br />
*ftp://ftp.icm.edu.pl/pub/Linux/disk/archlinux/<br />
*http://ftp.icm.edu.pl/pub/Linux/disk/archlinux/<br />
*rsync://ftp.icm.edu.pl/pub/Linux/disk/archlinux/<br />
<br />
===Russia===<br />
*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''<br />
<br />
===South Africa===<br />
*http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - ''Stellenbosch University''<br />
*ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
===United States===<br />
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19''<br />
* http://mirror.pointysoftware.net/archlinux/<br />
<br />
==IPv6-ready mirrors==<br />
*ftp.free.fr (France)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*http://mirror6.bjtu.edu.cn/archlinux (China)<br />
*http://mirrors.inetutils.net/archlinux/ (Malaysia)<br />
*http://mirror.ece.vt.edu/archlinux/ (Virginia, US)<br />
<br />
==Troubleshooting==<br />
<br />
===Out-of-sync mirrors: corrupted packages/file not found===<br />
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... --><br />
Issues regarding out-of-sync mirrors pointed out in [https://www.archlinux.org/news/482/ 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.<br />
<br />
After having synced with {{Ic|pacman -Sy}}, use this command:<br />
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
<br />
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.<br />
<br />
In any event, it is best to switch mirrors and sync with {{Ic|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.<br />
<br />
====Using all mirrors====<br />
To emulate {{Ic|pacman -Su}}'s behavior of going through the entire mirror list, use this script:<br />
{{hc|~/bin/pacup|<nowiki><br />
#!/bin/bash<br />
<br />
# Pacman will not exit on the first error. Comment the line below to<br />
# try from [testing] directly.<br />
pacman -Su "$@" && exit<br />
<br />
while read -r pkg; do<br />
if pacman -Ud "$pkg"; then<br />
continue<br />
else<br />
while read -r mirror; do<br />
pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") &&<br />
break<br />
done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \<br />
</etc/pacman.d/mirrorlist | tail -n +2 )<br />
fi<br />
done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
</nowiki>}}<br />
<br />
===Checking multiple mirrors with paccheck===<br />
The paccheck script can be used:<br />
* to compare pacman sync databases and package desc files to different mirrors,<br />
* to verify size of packages in pacman cache<br />
* to optionally compare packages in pacman cache to selected mirror(s).<br />
<br />
The script is intended to help to detect compromised mirrors, before the official implementation of [[package signing]]. It is destined for those who may want a little more assurance against some possible hacking scenarios of mirror servers.<br />
<br />
The Full System Update Procedure is:<br />
# Run ''paccheck'' as a non-root user. Pacman will be synchronised and the needed packages will be downloaded.<br />
# Examine report<br />
# If no package ''mismatch'', then run {{ic|pacman -Su}} as root to update your system<br />
<br />
The script can be found in the [[Arch User Repository|AUR]]: {{AUR|paccheck}}<br />
<br />
== See Also ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>Rzm