Difference between revisions of "Mirrors"

From ArchWiki
Jump to: navigation, search
(Added mirrors.acm.wpi.edu to U.S. (pending being added as an official Tier 2 mirror))
(Unofficial mirrors: Add SJTUG mirror)
 
(155 intermediate revisions by 56 users not shown)
Line 5: Line 5:
 
[[fr:Miroirs]]
 
[[fr:Miroirs]]
 
[[it:Mirrors]]
 
[[it:Mirrors]]
[[ja:Mirrors]]
+
[[ja:ミラー]]
 +
[[ru:Mirrors]]
 
[[zh-CN:Mirrors]]
 
[[zh-CN:Mirrors]]
 
{{Related articles start}}
 
{{Related articles start}}
{{Related|Mirroring}}
 
 
{{Related|pacman}}
 
{{Related|pacman}}
{{Related|reflector}}
 
 
{{Related articles end}}
 
{{Related articles end}}
  
 
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.
 
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.
 +
 +
== Official mirrors ==
 +
 +
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 Mirrorlist Generator] page on the main site.
 +
 +
Check the status of the Arch mirrors by visiting the [https://www.archlinux.org/mirrors/status/ Mirror Status] page. It is recommended to only use mirrors that are up to date, i.e. not out of sync.
 +
 +
If you want your mirror to be added to the official list, see [[DeveloperWiki:NewMirrors]]. In the meantime, add it to the [[#Unofficial mirrors]] list at the end of this page.
 +
 +
=== IPv6-ready mirrors ===
 +
 +
The [https://www.archlinux.org/mirrorlist/?ip_version=6 Pacman Mirrorlist Generator] can also be used to find a list of current IPv6 mirrors.
  
 
== Enabling a specific mirror ==
 
== Enabling a specific mirror ==
  
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region.  Uncomment mirrors you would like to use.
+
To enable mirrors, edit {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region.  Uncomment mirrors you would like to use.
{{Note | ftp.archlinux.org is [https://www.archlinux.org/news/throttling-ftparchlinuxorg-rsyncarchlinuxorg/ throttled at 50KB/s].}}
+
 
 
Example:
 
Example:
  
Line 25: Line 36:
 
  '''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''
 
  '''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''
  
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.
+
See [[#Sorting mirrors]] for tools that help choosing mirrors.
  
{{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.}}
+
{{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.
 +
* HTTP mirrors are faster than FTP due to [[Wikipedia:HTTP persistent connection|persistent HTTP connection]]: with FTP, a new connection to server has to be established each time ''pacman'' requests a package to be downloaded, which results in a brief pause.
 +
}}
  
 
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:
 
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:
Line 33: Line 47:
 
  Include = /etc/pacman.d/mirrorlist
 
  Include = /etc/pacman.d/mirrorlist
  
To use the ''HostEurope'' mirror as a default mirror, add it before the {{Ic|Include}} line:
+
To use the ''HostEurope'' mirror as a default mirror, add it before the {{ic|Include}} line:
 
  [core]
 
  [core]
 
  '''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''
 
  '''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''
Line 43: Line 57:
  
 
=== Force pacman to refresh the package lists ===
 
=== Force pacman to refresh the package lists ===
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{Ic|rankmirrors}}) issue the following command:
 
# pacman -Syy
 
  
{{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.}}
+
Mirrors can be out of sync and the package list from the old mirror may not correspond to the package list of the new mirror, even though the dates of the lists may suggest that they do.
  
==Mirror status==
+
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{ic|rankmirrors}}) issue the following command:
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/.
+
# pacman -Syyu
  
You can generate an up to date mirrorlist [https://www.archlinux.org/mirrorlist/ here], automate the process with a [[#Script to download from 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:
+
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 -Syyu}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues. See also [https://bbs.archlinux.org/viewtopic.php?id=163124 Is -Syy safe?].
#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 {{ic|i686}} directory on the mirror to the ''[extra]'' date on the homepage, in the ''Package Repositories'' box to the right.
+
  
==Sorting mirrors==
+
== Sorting mirrors ==
When downloading packages pacman uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. 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.
+
  
{{Note|This does not apply to [[Improve_Pacman_Performance#Using_powerpill-light | powerpill-light]], which connects to many servers simultaneously to increase the overall download speed. The speed of individual connections becomes less relevant, and powerpill-light can be configured to require minimum speeds per connection.}}
+
When downloading packages pacman uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. To set a priority to mirrors, the mirrorlist file has to be sorted manually or using a script.
  
===List by speed===
+
It is not a good idea to just use the fastest mirrors, since the fastest mirrors might be out of sync. Instead, make a list of mirrors sorted by their [[#List by speed|speed]], then remove those from the list that are out of sync according to their [https://www.archlinux.org/mirrors/status/ status].
  
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}.
+
It is recommended to repeat this process before every system upgrade to keep {{ic|/etc/pacman.d/mirrorlist}} up to date.
 +
 
 +
=== List by speed ===
 +
 
 +
The {{Pkg|pacman}} package provides a Bash script, {{ic|/usr/bin/rankmirrors}}, which can be used to rank the mirrors according to their connection and opening speeds to take advantage of using the fastest local mirror.
  
 
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:
 
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:
 +
 
  # cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
 
  # cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
  
 
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.
 
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.
  
Optionally run the following {{Ic|sed}} line to uncomment every mirror:
+
Optionally run the following {{ic|sed}} line to uncomment every mirror:
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup
+
  
Finally, rank the mirrors. Operand {{Ic|-n 6}} means only output the 6 fastest mirrors:
+
  # sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup
  # rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist
+
  
Run {{Ic|rankmirrors -h}} for a list of all the available options.
+
Finally, rank the mirrors. Operand {{ic|-n 6}} means only output the 6 fastest mirrors:
  
===Combined listing by speed and status===
+
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist
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 {{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.  
+
Run {{ic|rankmirrors -h}} for a list of all the available options.
  
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.
+
=== Server-side ranking ===
  
=== Script to download from Mirrorlist Generator ===
+
The official [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] provides an easy way to obtain a ranked list of mirrors. Because all ranking is done on a single server that takes multiple factors into account, the amount of load on the mirrors and the clients is significantly lower compared to ranking on each individual client.
  
The following shell script can be used to create a mirror list based on the rankings produced by the [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] (the country variable will need to be changed if not living in the United States).  It can be downloaded by invoking: {{ic|<nowiki>curl http://pastebin.ca/raw/2404700 -o pacmrr</nowiki>}}, ([http://pastebin.ca/2404700 view script]).
+
There are multiple scripts automating the update of the mirrorlist from the ranking server:
  
===Using Reflector===
+
* [[Reflector]] retrieves the latest mirrorlist from the [https://www.archlinux.org/mirrors/status/ MirrorStatus] page, filters the most up-to-date mirrors, sorts them by speed and overwrites the {{ic|/etc/pacman.d/mirrorlist}} file.
 +
* {{AUR|update-pacman-mirrorlist}} is a minimalistic script that downloads a mirrorlist from a specified ranking server defaulting to the official [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. It also provides an optional [[Systemd/Timers|systemd timer]] to manage the mirrorlist automatically without intervention.
 +
* [https://github.com/Gen2ly/armrr armrr] downloads a ranked mirrorlist for a specific country from the [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] and creates a backup of the previous mirrorlist.
  
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}}.
+
=== List mirrors only for a specific country ===
  
=== Choosing a local mirror ===
+
Can be useful to automate update of the mirror list only for a specific countries instead of making a speed test each time. Assumed that {{ic|mirrorlist.pacnew}} exist, the file creates after installation of the {{Pkg|pacman-mirrorlist}} update.
The simple way is to edit the mirrorlist file by placing a local mirror at the top of the list. pacman will then use this mirror for preference.
+
  
Alternatively {{ic|/etc/pacman.conf}} can be edited by placing a local mirror before the line sourcing the mirrorlist file, i.e. where it says "add your preferred servers here". It is safer if you use the same server for each repository.
+
{{bc|<nowiki>Cnt="China";
 +
awk -v GG="$Cnt" '{if(match($0,GG) != "0")AA="1";if(AA == "1"){if( length($2) != "0"  )print substr($0,2) ;else AA="0"} }' \
 +
/etc/pacman.d/mirrorlist.pacnew</nowiki>}}
  
==Official mirrors==
+
== Troubleshooting ==
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.
+
  
In the unlikely scenario that you are without any configured mirrors and {{Ic|pacman-mirrorlist}} is not installed, run the following command:
+
In the unlikely scenario that you are without any configured mirrors and {{ic|pacman-mirrorlist}} is not installed, run the following command:
  # wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki>
+
  # curl -o /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki>
  
 
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 -Syu pacman-mirrorlist
# 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 {{ic|$arch}} variable is used but not defined, add the following to your {{ic|/etc/pacman.conf}}:
 
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}}:
 
  Architecture = x86_64
 
  Architecture = x86_64
  
{{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===
+
== Unofficial 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==
 
 
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.
 
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.
  
===Global===
+
=== Austria ===
* 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
 
 
===Austria===
 
 
*http://gd.tuwien.ac.at/opsys/linux/archlinux/ - ''Vienna University of Technology''
 
*http://gd.tuwien.ac.at/opsys/linux/archlinux/ - ''Vienna University of Technology''
 
*ftp://gd.tuwien.ac.at/opsys/linux/archlinux/
 
*ftp://gd.tuwien.ac.at/opsys/linux/archlinux/
  
===Bulgaria===
+
=== Canada ===
*http://mirror.telepoint.bg/archlinux/
+
 
*ftp://mirror.telepoint.bg/archlinux/
+
*https://na.mirrors.coltondrg.com/archlinux/
 +
 
 +
=== China ===
  
===China===
+
'''Telecom'''
'''CHINA TELECOM'''
+
*http://mirror.bit.edu.cn/archlinux/ - ''Beijing Institute of Technology''
*http://mirror.lupaworld.com/archlinux/
+
*http://mirrors.aliyun.com/archlinux/ - ''Alibaba''
  
'''CHINA UNICOM'''
+
'''Unicom'''
 
*http://mirrors.sohu.com/archlinux/
 
*http://mirrors.sohu.com/archlinux/
 +
*http://mirrors.yun-idc.com/archlinux/
  
 
'''Cernet'''
 
'''Cernet'''
*http://mirrors.zju.edu.cn/archlinux/ - ''Zhejian University''
+
*http://mirrors.geekpie.org/archlinux/ - ''Geek Pie Association @ ShanghaiTech University''
*http://ftp.sjtu.edu.cn/archlinux/ - ''Shanghai Jiaotong University''
+
*http://ftp.sjtu.edu.cn/archlinux/ - ''Shanghai Jiaotong University(Legacy)''
*ftp://ftp.sjtu.edu.cn/archlinux/
+
*https://mirrors.sjtug.org/archlinux/ - ''Shanghai Jiaotong University Linux User Group''
*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.4.tuna.tsinghua.edu.cn/archlinux/ ''(ipv4 only)''
 
*http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ ''(ipv6 only)''
 
*http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ ''(ipv6 only)''
 
*http://mirror.lzu.edu.cn/archlinux/ - ''Lanzhou University''
 
*http://mirror.lzu.edu.cn/archlinux/ - ''Lanzhou University''
*http://mirrors.huste.du.cn/archlinux - ''Huazhong University of Science and Technology''
 
  
===France===
+
=== France ===
*http://delta.archlinux.fr/ - ''With Delta package support. Needs xdelta3 package from extra to run.''
+
 
*http://mirror.soa1.org/archlinux
+
*http://delta.archlinux.fr/ - ''With Delta package support. Needs {{Pkg|xdelta3}} to run.''
*ftp://mirror:mirror@mirror.soa1.org/archlinux
+
*https://eu.mirrors.coltondrg.com/archlinux/
 +
 
 +
=== Germany ===
  
===Germany===
 
*http://ftp.uni-erlangen.de/mirrors/archlinux/
 
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/
 
 
*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/
 
  
===India===
+
=== Indonesia ===
*http://ftp.iitm.ac.in/archlinux/
+
*ftp://ftp.iitm.ac.in/archlinux/
+
  
===Indonesia===
 
*http://mirror.kavalinux.com/archlinux/ - ''only from Indonesia''
 
 
*http://kambing.ui.ac.id/archlinux/
 
*http://kambing.ui.ac.id/archlinux/
*http://repo.ukdw.ac.id/archlinux/
 
  
===Japan===
+
=== Iran ===
 +
 
 +
*http://mirror.yazd.ac.ir/arch/
 +
 
 +
=== Italy ===
 +
 
 +
*http://mi.mirror.garr.it/mirrors/archlinux/
 +
 
 +
=== Japan ===
 +
 
 
*http://ftp.nara.wide.ad.jp/pub/Linux/archlinux/ - ''NAra Institute of Science and Technology''
 
*http://ftp.nara.wide.ad.jp/pub/Linux/archlinux/ - ''NAra Institute of Science and Technology''
 
*http://ftp.kddilabs.jp/Linux/packages/archlinux/
 
*http://ftp.kddilabs.jp/Linux/packages/archlinux/
 
*http://srv2.ftp.ne.jp/Linux/packages/archlinux/
 
*http://srv2.ftp.ne.jp/Linux/packages/archlinux/
  
===Kazakhstan===
+
=== Malaysia ===
*http://archlinux.kz/
+
*http://mirror.neolabs.kz/archlinux/
+
*http://mirror-kt.neolabs.kz/archlinux/
+
  
===Malaysia===
 
 
*http://mirror.oscc.org.my/archlinux/
 
*http://mirror.oscc.org.my/archlinux/
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''
 
  
===New Zealand===
+
=== New Zealand ===
*http://mirror.ihug.co.nz/archlinux/
+
 
 
*http://mirror.ece.auckland.ac.nz/archlinux/  ''NZ only''
 
*http://mirror.ece.auckland.ac.nz/archlinux/  ''NZ only''
===Poland===
+
 
 +
=== Poland ===
 +
 
 
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
 
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
 
*http://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
 
*rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
  
===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://mirrors.krasinfo.ru/archlinux/ - ''Krasnoyarsk, Classica-Service Ltd''
 
*http://mirrors.krasinfo.ru/archlinux/ - ''Krasnoyarsk, Classica-Service Ltd''
  
===Singapore===
+
=== South Africa ===
*http://mirror.nus.edu.sg/archlinux/
+
  
===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''
 
*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''
 
*http://mirror.ufs.ac.za/archlinux/ - ''University of the Free State''
 
*ftp://mirror.ufs.ac.za/os/linux/distros/archlinux/
 
*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''
 
*http://archlinux.mirror.ac.za - ''TENET - Tertiary Education and Research Network of South Africa''
 
*ftp://archlinux.mirror.ac.za
 
*ftp://archlinux.mirror.ac.za
  
===United States===
+
=== Sweden ===
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19''
+
* http://mirror.clarkson.edu/archlinux/
+
* http://mirror.pointysoftware.net/archlinux/
+
* http://mirrors.acm.wpi.edu/archlinux/
+
  
===Viet Nam===
+
*http://foss.dhyrule.se/linux/archlinux/
'''FPT TELECOM'''
+
*ftp://foss.dhyrule.se/linux/archlinux/
*http://mirror-fpt-telecom.fpt.net/archlinux/
+
  
===Hyperboria===
+
=== Thailand ===
* http://[fc7b:5f90:01f8:2b33:7c3e:f94b:00f3:0bed]/archlinux/
+
  
==Troubleshooting==
+
* http://mirror1.ku.ac.th/archlinux/
  
===Out-of-sync mirrors: corrupted packages/file not found===
+
=== United States ===
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... -->
+
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.
+
  
After having synced with {{Ic|pacman -Sy}}, use this command:
+
* http://mirror.clarkson.edu/archlinux/
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \
+
* http://mirror.pointysoftware.net/archlinux/
                                              -e 's,/\(community\)/,/\1-testing/,')
+
* http://mirror.ziemer.bz/archlinux
 
+
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 {{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.
+
 
+
====Using all mirrors====
+
To emulate {{Ic|pacman -Su}}'s behavior of going through the entire mirror list, use this script:
+
{{hc|~/bin/pacup|<nowiki>
+
#!/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
+
=== Sourceforge (old ISOs) ===
  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/,')
+
</nowiki>}}
+
  
== See Also ==
+
* http://sourceforge.net/projects/archlinux/files/ - ''ISO files only; Does not have any releases since 2006. Use it only for getting older ISOs.''
* [http://wiki.gotux.net/code/bash/mirup MirUp] &ndash; pacman mirrorlist downloader/checker
+

Latest revision as of 03:03, 31 August 2016

Related articles

This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.

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 Mirrorlist Generator page on the main site.

Check the status of the Arch mirrors by visiting the Mirror Status page. It is recommended to only use mirrors that are up to date, i.e. not out of sync.

If you want your mirror to be added to the official list, see DeveloperWiki:NewMirrors. In the meantime, add it to the #Unofficial mirrors list at the end of this page.

IPv6-ready mirrors

The Pacman Mirrorlist Generator can also be used to find a list of current IPv6 mirrors.

Enabling a specific mirror

To enable mirrors, edit /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 #Sorting mirrors for tools that help choosing mirrors.

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.
  • HTTP mirrors are faster than FTP due to persistent HTTP connection: with FTP, a new connection to server has to be established each time pacman requests a package to be downloaded, which results in a brief pause.

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.

Note: If mirrors have been stated directly in 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].

Force pacman to refresh the package lists

Mirrors can be out of sync and the package list from the old mirror may not correspond to the package list of the new mirror, even though the dates of the lists may suggest that they do.

After creating/editing /etc/pacman.d/mirrorlist, (manually or by using rankmirrors) issue the following command:

# pacman -Syyu

Passing two --refresh or -y flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing pacman -Syyu whenever changing to a new mirror is good practice and will avoid possible issues. See also Is -Syy safe?.

Sorting mirrors

When downloading packages pacman uses the mirrors in the order they are in /etc/pacman.d/mirrorlist. To set a priority to mirrors, the mirrorlist file has to be sorted manually or using a script.

It is not a good idea to just use the fastest mirrors, since the fastest mirrors might be out of sync. Instead, make a list of mirrors sorted by their speed, then remove those from the list that are out of sync according to their status.

It is recommended to repeat this process before every system upgrade to keep /etc/pacman.d/mirrorlist up to date.

List by speed

The pacman package provides a Bash script, /usr/bin/rankmirrors, which can be used to rank the mirrors according to their connection and opening speeds to take advantage of using the fastest local mirror.

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 -i 's/^#Server/Server/' /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.

Server-side ranking

The official Pacman Mirrorlist Generator provides an easy way to obtain a ranked list of mirrors. Because all ranking is done on a single server that takes multiple factors into account, the amount of load on the mirrors and the clients is significantly lower compared to ranking on each individual client.

There are multiple scripts automating the update of the mirrorlist from the ranking server:

  • Reflector retrieves the latest mirrorlist from the MirrorStatus page, filters the most up-to-date mirrors, sorts them by speed and overwrites the /etc/pacman.d/mirrorlist file.
  • update-pacman-mirrorlistAUR is a minimalistic script that downloads a mirrorlist from a specified ranking server defaulting to the official Pacman Mirrorlist Generator. It also provides an optional systemd timer to manage the mirrorlist automatically without intervention.
  • armrr downloads a ranked mirrorlist for a specific country from the Pacman Mirrorlist Generator and creates a backup of the previous mirrorlist.

List mirrors only for a specific country

Can be useful to automate update of the mirror list only for a specific countries instead of making a speed test each time. Assumed that mirrorlist.pacnew exist, the file creates after installation of the pacman-mirrorlist update.

Cnt="China";
awk -v GG="$Cnt" '{if(match($0,GG) != "0")AA="1";if(AA == "1"){if( length($2) != "0"  )print substr($0,2) ;else AA="0"} }' \
 /etc/pacman.d/mirrorlist.pacnew

Troubleshooting

In the unlikely scenario that you are without any configured mirrors and pacman-mirrorlist is not installed, run the following command:

# curl -o /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/

Be sure to uncomment a preferred mirror as described above, then:

# pacman -Syu pacman-mirrorlist

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
Note: You can also use the values auto and i686 for the Architecture variable.

Unofficial mirrors

These mirrors are not listed in /etc/pacman.d/mirrorlist.

Austria

Canada

China

Telecom

Unicom

Cernet

France

Germany

Indonesia

Iran

Italy

Japan

Malaysia

New Zealand

Poland

Russia

South Africa

Sweden

Thailand

United States

Sourceforge (old ISOs)