https://wiki.archlinux.org/api.php?action=feedcontributions&user=Clarkok&feedformat=atomArchWiki - User contributions [en]2024-03-28T08:34:54ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Mirrors_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=248136Mirrors (简体中文)2013-02-22T02:36:08Z<p>Clarkok: /* Script to automate use of Pacman Mirrorlist Generator */</p>
<hr />
<div>[[Category:About Arch (简体中文)]]<br />
[[Category:Package management (简体中文)]]<br />
[[en:Mirrors]]<br />
[[es:Mirrors]]<br />
[[fr:Miroirs]]<br />
[[it:Mirrors]]<br />
{{Article summary start|摘要}}<br />
{{Article summary text|更新和管理软件包镜像}}<br />
{{Article summary heading|相关}}<br />
{{Article summary wiki|Mirroring}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
本页面说明如何选择和配置镜像,以及列出可用的镜像。<br />
<br />
== 启用您喜爱的镜像 ==<br />
<br />
想要启用镜像,打开 {{ic|/etc/pacman.d/mirrorlist}} 并定位到你的地理区域。对您想使用的镜像取消注释。<br />
{{注意 | ftp.archlinux.org [https://www.archlinux.org/news/302/ 限速 50KB/s]}} 例如:<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 />
参见 [[#镜像状态]] 和 [[#按速度排序]] 查看帮助选择镜像的工具。<br />
<br />
{{小贴士|取消5个你最喜欢的镜像的注释,把他们放在 mirrorlist 文件最上方。这样你就很容易找到它们并且如果第一个镜像出问题可以很容易切换。这也让合并 mirrorlist 更新更容易。}}<br />
<br />
也可以在 {{ic|/etc/pacman.conf}} 中指定镜像。对于 ''[core]'' 仓库,默认设置是:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
想要使用 ''HostEurope'' 镜像作为默认镜像,把它添加在 {{Ic|Include}} 行之前:<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 会首先尝试链接这个镜像。如果需要的话,可以继续修改''[testing]'', ''[extra]'', 和 ''[community]''部分。<br />
<br />
{{注意|如果镜像直接在 {{ic|pacman.conf}} 中声明,记得在所有的仓库使用同样的镜像。否则不相容的包就可能被安装。如 ''[core]'' 中的 linux 和 ''[extra]'' 中的旧的内核模块不相容。}}<br />
<br />
==镜像状态==<br />
可以通过访问如下网址检查镜像的状态:<br />
* https://www.archlinux.org/mirrors/status/<br />
* http://www.archlinux.de/?page=MirrorStatus<br />
<br />
从[https://www.archlinux.org/mirrorlist/ 这里]可以自动生成最新的镜像列表,安装[[Reflector]]这个工具也可以自动检查和生成镜像列表。<br />
<br />
==镜像排序==<br />
===按速度排序===<br />
更快的源可以显著的提升pacman的性能,和arch的整体操作体验。可以使用 {{ic|rankmirrors}} 将镜像列表按速度排列。但是{{ic|rankmirrors}}不能测试这些源的速度。<br />
<br />
{{ic|cd}}到{{ic|/etc/pacman.d/}}目录:<br />
{{bc|# cd /etc/pacman.d}}<br />
<br />
备份已经存在的{{ic|/etc/pacman.d/mirrorlist}}:<br />
{{bc|# cp mirrorlist mirrorlist.backup}}<br />
<br />
编辑{{ic|/etc/pacman.d/mirrorlist.backup}},取消要测速镜像前的注释。<br />
<br />
让rankmirrors带上参数{{ic|-n}}对这个备份文件{{ic|mirrorlist.backup}}执行操作,然后把输出重定向以方便生成一个新的/etc/pacman.d/mirrorlist源列表:<br />
{{bc|# rankmirrors -n 6 mirrorlist.backup > mirrorlist}}<br />
{{注意|'''-n 6''':将生成6个最接近的源,运行{{Ic|rankmirrors -h}}可查看所有可用选项。}}<br />
<br />
'''强制 pacman 刷新软件包列表''':<br />
# pacman -Syy<br />
<br />
{{Tip|传入两次{{Ic|--refresh}}或{{Ic|-y}}将强制更新所有软件包列表,即使系统认为它们已经是最新。'''每次修改镜像之后都应该使用{{Ic|pacman -Syy}}'''。}}<br />
<br />
===按速度和状态排序===<br />
仅是使用最快的镜像服务器并不是一件好事,因为它们可能是过时的。我们更推荐先[[#按速度排序]],然后在选出的镜像中按[[#镜像状态]]排序。<br />
<br />
只要简单地访问它们的[[#镜像状态]]连接,然后将它们按照尽量新的顺序排序。将越新的镜像排到{{ic|/etc/pacman.d/mirrorlist}}的越上面。如果镜像真的太过时了,别用它们(把它们注释掉,然后再[[#按速度排序]]),重复这么做,排除过时的镜像。最后将有6个又快又新的镜像。<br />
<br />
当出现镜像问题是,应该重复上面的步骤。或者一段时间就重复一次以保持{{ic|/etc/pacman.d/mirrorlist}}最新,即使没有镜像问题。<br />
<br />
===自动使用Pacman Mirrorlist Generator的脚本===<br />
你可以使用下面的脚本来更新你的镜像列表。该脚本基于[https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]给出的顺序。如果你不在美国,你可以更改国家变量。<br />
<br />
{{hc|updatemirrors.sh|2=<nowiki>#!/bin/sh<br />
<br />
[ "$UID" != 0 ] && su=sudo<br />
<br />
country='us'<br />
url="https://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 />
# 获得最新的镜像列表,并保存到 tmpfile<br />
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile"<br />
<br />
# 备份并替换现有的镜像列表<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|你需要复制上面的文本,放到一文件中,然后对该文件运行{{Ic|chmod +x}}。如果你现在不是以Root的身份登录,当需要替换mirrorlist的时候,这个脚本将会调用sudo}}<br />
<br />
===使用 Reflector===<br />
<br />
[[Reflector]]工具可以从[https://www.archlinux.org/mirrors/status/ 镜像状态]页面自动获取最新的镜像列表,过滤掉未及时同步的镜像,然后按照速度排序覆盖{{ic|/etc/pacman.d/mirrorlist}}。<br />
<br />
==官方镜像==<br />
官方镜像可以通过软件包 {{pkg|pacman-mirrorlist}} 获得。最新的镜像可以通过[https://www.archlinux.org/mirrorlist/ Pacman 镜像列表生成器]查询。<br />
<br />
如果没有配置任何镜像,也没有安装 {{Ic|pacman-mirrorlist}},请运行如下命令:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
取消选中镜像前的注释然后:<br />
# pacman -Syy<br />
# pacman -S --force pacman-mirrorlist<br />
<br />
如果要将自己的镜像加入官方列表,请提出申请并将其加入下面的 [[#非官方镜像]] 列表。<br />
<br />
如果碰到 {{ic|$arch}} 变量未定义的问题,请在 {{ic|/etc/pacman.conf}} 中加入:<br />
Architecture = auto<br />
<br />
=== 支持 IPv6 的镜像 ===<br />
[https://www.archlinux.org/mirrorlist/?country=all&protocol=http&ip_version=6 pacman 镜像列表生成工具] 可以用来查找当前的 IPv6 镜像。<br />
<br />
==非官方镜像==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===全球===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===保加利亚===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===中国===<br />
# CHINA TELECOM<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
===德国===<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 />
===印度尼西亚===<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 />
===立陶宛===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===马来西亚===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===新西兰===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
<br />
===俄罗斯===<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 />
===南非===<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 />
===美国===<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 />
==疑难解答==<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 />
===使用所有镜像===<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 />
== 参见 ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>Clarkokhttps://wiki.archlinux.org/index.php?title=Mirrors_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=248135Mirrors (简体中文)2013-02-22T02:28:37Z<p>Clarkok: /* 按速度和状态排序 */</p>
<hr />
<div>[[Category:About Arch (简体中文)]]<br />
[[Category:Package management (简体中文)]]<br />
[[en:Mirrors]]<br />
[[es:Mirrors]]<br />
[[fr:Miroirs]]<br />
[[it:Mirrors]]<br />
{{Article summary start|摘要}}<br />
{{Article summary text|更新和管理软件包镜像}}<br />
{{Article summary heading|相关}}<br />
{{Article summary wiki|Mirroring}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
本页面说明如何选择和配置镜像,以及列出可用的镜像。<br />
<br />
== 启用您喜爱的镜像 ==<br />
<br />
想要启用镜像,打开 {{ic|/etc/pacman.d/mirrorlist}} 并定位到你的地理区域。对您想使用的镜像取消注释。<br />
{{注意 | ftp.archlinux.org [https://www.archlinux.org/news/302/ 限速 50KB/s]}} 例如:<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 />
参见 [[#镜像状态]] 和 [[#按速度排序]] 查看帮助选择镜像的工具。<br />
<br />
{{小贴士|取消5个你最喜欢的镜像的注释,把他们放在 mirrorlist 文件最上方。这样你就很容易找到它们并且如果第一个镜像出问题可以很容易切换。这也让合并 mirrorlist 更新更容易。}}<br />
<br />
也可以在 {{ic|/etc/pacman.conf}} 中指定镜像。对于 ''[core]'' 仓库,默认设置是:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
想要使用 ''HostEurope'' 镜像作为默认镜像,把它添加在 {{Ic|Include}} 行之前:<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 会首先尝试链接这个镜像。如果需要的话,可以继续修改''[testing]'', ''[extra]'', 和 ''[community]''部分。<br />
<br />
{{注意|如果镜像直接在 {{ic|pacman.conf}} 中声明,记得在所有的仓库使用同样的镜像。否则不相容的包就可能被安装。如 ''[core]'' 中的 linux 和 ''[extra]'' 中的旧的内核模块不相容。}}<br />
<br />
==镜像状态==<br />
可以通过访问如下网址检查镜像的状态:<br />
* https://www.archlinux.org/mirrors/status/<br />
* http://www.archlinux.de/?page=MirrorStatus<br />
<br />
从[https://www.archlinux.org/mirrorlist/ 这里]可以自动生成最新的镜像列表,安装[[Reflector]]这个工具也可以自动检查和生成镜像列表。<br />
<br />
==镜像排序==<br />
===按速度排序===<br />
更快的源可以显著的提升pacman的性能,和arch的整体操作体验。可以使用 {{ic|rankmirrors}} 将镜像列表按速度排列。但是{{ic|rankmirrors}}不能测试这些源的速度。<br />
<br />
{{ic|cd}}到{{ic|/etc/pacman.d/}}目录:<br />
{{bc|# cd /etc/pacman.d}}<br />
<br />
备份已经存在的{{ic|/etc/pacman.d/mirrorlist}}:<br />
{{bc|# cp mirrorlist mirrorlist.backup}}<br />
<br />
编辑{{ic|/etc/pacman.d/mirrorlist.backup}},取消要测速镜像前的注释。<br />
<br />
让rankmirrors带上参数{{ic|-n}}对这个备份文件{{ic|mirrorlist.backup}}执行操作,然后把输出重定向以方便生成一个新的/etc/pacman.d/mirrorlist源列表:<br />
{{bc|# rankmirrors -n 6 mirrorlist.backup > mirrorlist}}<br />
{{注意|'''-n 6''':将生成6个最接近的源,运行{{Ic|rankmirrors -h}}可查看所有可用选项。}}<br />
<br />
'''强制 pacman 刷新软件包列表''':<br />
# pacman -Syy<br />
<br />
{{Tip|传入两次{{Ic|--refresh}}或{{Ic|-y}}将强制更新所有软件包列表,即使系统认为它们已经是最新。'''每次修改镜像之后都应该使用{{Ic|pacman -Syy}}'''。}}<br />
<br />
===按速度和状态排序===<br />
仅是使用最快的镜像服务器并不是一件好事,因为它们可能是过时的。我们更推荐先[[#按速度排序]],然后在选出的镜像中按[[#镜像状态]]排序。<br />
<br />
只要简单地访问它们的[[#镜像状态]]连接,然后将它们按照尽量新的顺序排序。将越新的镜像排到{{ic|/etc/pacman.d/mirrorlist}}的越上面。如果镜像真的太过时了,别用它们(把它们注释掉,然后再[[#按速度排序]]),重复这么做,排除过时的镜像。最后将有6个又快又新的镜像。<br />
<br />
当出现镜像问题是,应该重复上面的步骤。或者一段时间就重复一次以保持{{ic|/etc/pacman.d/mirrorlist}}最新,即使没有镜像问题。<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 [https://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='us'<br />
url="https://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 />
===使用 Reflector===<br />
<br />
[[Reflector]]工具可以从[https://www.archlinux.org/mirrors/status/ 镜像状态]页面自动获取最新的镜像列表,过滤掉未及时同步的镜像,然后按照速度排序覆盖{{ic|/etc/pacman.d/mirrorlist}}。<br />
<br />
==官方镜像==<br />
官方镜像可以通过软件包 {{pkg|pacman-mirrorlist}} 获得。最新的镜像可以通过[https://www.archlinux.org/mirrorlist/ Pacman 镜像列表生成器]查询。<br />
<br />
如果没有配置任何镜像,也没有安装 {{Ic|pacman-mirrorlist}},请运行如下命令:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
取消选中镜像前的注释然后:<br />
# pacman -Syy<br />
# pacman -S --force pacman-mirrorlist<br />
<br />
如果要将自己的镜像加入官方列表,请提出申请并将其加入下面的 [[#非官方镜像]] 列表。<br />
<br />
如果碰到 {{ic|$arch}} 变量未定义的问题,请在 {{ic|/etc/pacman.conf}} 中加入:<br />
Architecture = auto<br />
<br />
=== 支持 IPv6 的镜像 ===<br />
[https://www.archlinux.org/mirrorlist/?country=all&protocol=http&ip_version=6 pacman 镜像列表生成工具] 可以用来查找当前的 IPv6 镜像。<br />
<br />
==非官方镜像==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===全球===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===保加利亚===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===中国===<br />
# CHINA TELECOM<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
===德国===<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 />
===印度尼西亚===<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 />
===立陶宛===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===马来西亚===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===新西兰===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
<br />
===俄罗斯===<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 />
===南非===<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 />
===美国===<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 />
==疑难解答==<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 />
===使用所有镜像===<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 />
== 参见 ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>Clarkok