Manjaro Difference between revisions of "Pacman-mirrors/zh-cn"

Difference between revisions of "Pacman-mirrors/zh-cn"

From Manjaro
(Created page with "# wikipedia.org # github.com # bitbucket.org")
Tags: Mobile web edit Mobile edit
 
(Updating to match new version of source page)
 
(9 intermediate revisions by 3 users not shown)
Line 3: Line 3:
== Pacman-Mirrors ==
== Pacman-Mirrors ==


Pacman-mirrors is a Manjaro specific utility for generating and maintaining the system mirrorlist. This article covers current version 4.x.
Pacman-mirrors 是一个 Manjaro 专门用于生成和维护系统镜像列表的应用程序。本文介绍以当前的 4.x 版本为准。其中,Pacman-mirrors 所提供的可用镜像,均可在[http://repo.manjaro.org 镜像服务]页面上查看。
Pacman-mirrors uses the information available on the [http://repo.manjaro.org Mirrorservice]


=== 目的 ===
=== 目的 ===
Manjaro uses pacman for system maintenance, updates and new installs. For pacman to function, a list of servers, or more commonly known as mirrors, with Manjaro software packages is required. As Manjaro has many mirrors all over the world it is feasible to use the mirrors closest to your location and preferably also up-to-date.
Manjaro 使用 pacman 实现系统维护,更新数据和安装新的软件。为了让 pacman 有效运作,一栏服务器列表,或是作为更为大多数人所熟知的镜像站,与 Manjaro 软件包是密不可分的。就像是 Manjaro 在世界各地有着许多的镜像站那样,使用离你最近的镜像站是可行的,并且最好也要用最新的(up-to-date)。


<div class="mw-translate-fuzzy">
=== 使用 ===
=== 使用 ===
For most functions, a working internet connection is required. From v4, Pacman-Mirrors will check if network is online. It is doing so by querying some generic websites. The sites are chosen due to their general avaiability.
为了实现大多数的功能,链接到互联网是很有必要的。从 v4 版本开始,Pacman-Mirrors 将会在网络在线时,通过查询某些通用的网站,从而进行检查。也正是由于这些站点普遍可用,所以才选择了它们。
</div>


<div class="mw-translate-fuzzy">
# wikipedia.org
# wikipedia.org
# github.com
# github.com
# bitbucket.org
# bitbucket.org
</div>
如果你遇到证书错误,并且pacman-mirrors抛出了网络连接缺失的信息--你必须核实你的计算机固件日期和时间,因为这可能是由于配置或CMOS电池故障而导致的完全错误。
该应用程序由具有超级用户权限的普通用户从控制台运行,当没有给出参数时,它将显示pacman-mirrors的版本,然后是当前列在镜像列表中的镜像的状态。
<div class="mw-translate-fuzzy">
$ sudo pacman-mirrors
</div>


Should you get certificates error and pacman-mirrors throws a message of missing internet connection - you must verify your computers firmware date and time as this is probably completely off either because of configuration or a malfunctioning CMOS battery.
应用程序究竟如何生成镜像列表,可以通过在命令行上提供参数来添加。


The app is run by an ordinary user with superuser rights from the console and when no arguments are given it will display pacman-mirrors version followed by status of the mirrors currently listed in your mirrorlist.
<div class="mw-translate-fuzzy">
=== '''重要提示''' ===
{{Tip|每当运行 pacman-mirrors 时,都需要你同步你的数据库,并更新你的系统。}}
</div>


$ sudo pacman-mirrors
<div lang="en" dir="ltr" class="mw-content-ltr">
Only in the event that '''Last-Modifed''' on the mirror is newer - pacman requests the complete file.
</div>


Exactly how the app generates the mirrorlist is controlled by supplying arguments on the commandline.
<div lang="en" dir="ltr" class="mw-content-ltr">
This can present an awkward scenario where the local metadata is newer than the mirror but it contains older content.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
This inconsistency may then generate '''HTTP 404 Not Found''' errors because the local metadata could contain references to package versions which no longer exist.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
The doubled '''yy''' is to mitigate such possible issues - especially when you switch branch or mirror.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
It is bad practise to indiscrimately use '''-Syyu''' for update scenarios, but - pamac mirrorlist timer rewrites the mirrorlist on a weekly or bi-weekly basis - thus increasing the possibility of having inconsistent metadata - in which case the doubled '''yy''' makes sense - which is also why it is used in the pacman-mirrors man page.
</div>


=== '''IMPORTANT''' ===
<div lang="en" dir="ltr" class="mw-content-ltr">
{{Tip|Every run of pacman-mirrors requires you to syncronize your database and update your system.}}
To further the inconsistency - pamac uses copies of the pacman database - which has caused confusion before - pamac and pacman being in disagreement over available updates.
</div>


$ sudo pacman -Syyu
<div class="mw-translate-fuzzy">
$ sudo pacman -Syyu
</div>


If you fail to do so, the issue/s which had you make change might not be solved. Furthermore you might run into [[System_Maintenance|''partial-updated'']] scenario which can cause havoc in your system. For more detailed information on how pacman works you can read up on the [https://wiki.archlinux.org/index.php/System_maintenance Archlinux Wiki]
如果你不这样做,让你做出改变的问题可能不会得到解决。此外,你可能会遇到[[System_Maintenance|''partial-updated'']]的情况,这可能会对你的系统造成破坏。关于pacman如何工作的更多详细信息,你可以在[https://wiki.archlinux.org/index.php/System_maintenance Archlinux Wiki]上阅读。


<div lang="en" dir="ltr" class="mw-content-ltr">
==TL:DR - Samples please==
==TL:DR - Samples please==
All commands uses the available mirror pool.<br />
All commands uses the available mirror pool.<br />
Line 37: Line 71:
All samples are using the long name version of the argument.
All samples are using the long name version of the argument.
For short versions have a look at the [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs|man page] or the usage command
For short versions have a look at the [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs|man page] or the usage command
</div>


===Commands giving information===
===命令:展示信息===


====Man page====
<div class="mw-translate-fuzzy">
====说明页====
  man pacman-mirrors
  man pacman-mirrors
</div>


====Help on usage====
<div class="mw-translate-fuzzy">
====使用帮助====
  pacman-mirrors --help
  pacman-mirrors --help
</div>


====Version====
<div class="mw-translate-fuzzy">
====版本信息====
  pacman-mirrors --version
  pacman-mirrors --version
</div>


====Mirror status====
<div class="mw-translate-fuzzy">
====镜像状态====
  pacman-mirrors --status
  pacman-mirrors --status
</div>


====List available countries====
<div class="mw-translate-fuzzy">
In default mirror pool
====列出可用的国家和地区====
基于默认的镜像源:
  pacman-mirrors --country-list
  pacman-mirrors --country-list
</div>


In custom mirror pool
<div class="mw-translate-fuzzy">
基于自定义镜像源:
  pacman-mirrors --country-config
  pacman-mirrors --country-config
</div>


====What branch am I on====
<div class="mw-translate-fuzzy">
====所属版本分支====
  pacman-mirrors --get-branch
  pacman-mirrors --get-branch
</div>


===Commands using defaults===
===命令:使用默认镜像===


====Update mirrorlist with the fastest mirrors====
<div class="mw-translate-fuzzy">
====更新镜像列表,以获得最快的镜像====
  sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
  sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
</div>


====Limit to 5 mirrors====
<div class="mw-translate-fuzzy">
An optional number can be supplied to limit the number of mirrors in the mirrorlist
====限制为 5个 镜像====
可以提供一个具体的数量,以此限制镜像列表中的镜像数量:
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
</div>


====Mirrors for your country only====
<div class="mw-translate-fuzzy">
Not all countries have mirrors, if geoip returns a country not in the pool all mirrors will be used.
====只选择你所在的国家或地区的镜像====
并不是所有的国家和地区都有镜像,根据地理位置信息(geoip)返回的国家或地区,若不在镜像池中,则将会使用全部镜像。
  sudo pacman-mirrors --geoip && sudo pacman -Syyu
  sudo pacman-mirrors --geoip && sudo pacman -Syyu
</div>


===Commands customizing the mirror pool===
===命令:自定义镜像源===


You can customize the mirror pool to your preference.
你可以根据你自己的喜好,个性化设置你的镜像源。
BUT Don't limit yourself too much as pacman-mirrors '''only''' writes up-to-date mirrors to your mirrorlist.
但是!请勿过度限制你自己,因为 pacman-mirrors '''仅会''' 将最新的(up-to-date)镜像写入到你的镜像列表中。


====Customize mirror pool by continent====
<div class="mw-translate-fuzzy">
Create a custom mirror pool using mirrors from the continent determined by querying a geolocation service
====根据世界地理分区,自定义镜像源====
根据地址查询结果,使用所在大陆的镜像,创建一个定制的镜像源。
  sudo pacman-mirrors --continent && sudo pacman -Syyu
  sudo pacman-mirrors --continent && sudo pacman -Syyu
</div>


====Customize mirror pool by countries====
<div class="mw-translate-fuzzy">
Create a custom mirror pool using mirrors from Germany, France and Austria
====根据国家和地区,自定义镜像源====
使用德国(Germany)、法国(France)和奥地利(Austria)的镜像,创建一个定制的镜像源。
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
</div>


====Customize mirror pool by interactive selection====
<div class="mw-translate-fuzzy">
====根据互动选取,自定义镜像源====
Create a custom mirror pool using the '''--default''' mirror pool '''--interactive''' will list all available mirrors and procotols in a gui windows allowing to sort the columns and interactively select according to your preferences.
Create a custom mirror pool using the '''--default''' mirror pool '''--interactive''' will list all available mirrors and procotols in a gui windows allowing to sort the columns and interactively select according to your preferences.
  sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
  sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
</div>


====Use specific protocols (prioritized)====
<div class="mw-translate-fuzzy">
Rank the current mirror pool using only https and http protocol
====优先使用特定的传输协议====
仅使用 https http 协议对当前的镜像源进行排序。
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syyu
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syyu
</div>


====Switch branch to unstable and use German mirrors====
<div class="mw-translate-fuzzy">
Change the system branch to unstable and create a custom mirror pool using mirrors from Germany
====转换为 unstable 分支,并使用德国的镜像====
更改系统分支为不稳定(unstable) ,并使用德国(German)的镜像创建一个自定义镜像源。
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syyu
</div>


==== Switch branch and use German mirrors with https====
<div class="mw-translate-fuzzy">
==== 转化分支,并使用德国的镜像 and use German mirrors with https====
Change the system branch to unstable, set configuration to use https only and create a custom mirror pool using mirrors from Germany
Change the system branch to unstable, set configuration to use https only and create a custom mirror pool using mirrors from Germany
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syyu
</div>


===Reset===
===重置===
You will come to a point where you want to reset to defaults
若把设置重置为默认值,你将会回到原点。


  sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu
  <div class="mw-translate-fuzzy">
sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu
</div>


==Overview==
==简介==


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Available arguments ===
=== Available arguments ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
All available arguments can be viewed by unfolding this block
All available arguments can be viewed by unfolding this block
Line 125: Line 197:
[--api] [-S/-B BRANCH] [-p PREFIX]
[--api] [-S/-B BRANCH] [-p PREFIX]
[-P PROTO [PROTO...]] [-R] [-U URL]
[-P PROTO [PROTO...]] [-R] [-U URL]
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
METHODS:
METHODS:
   -i, --interactive    Generate custom mirrorlist
   -i, --interactive    Generate custom mirrorlist
Line 136: Line 210:
   --geoip              Get current country using geolocation
   --geoip              Get current country using geolocation
   --continent          Use continent from geolocation
   --continent          Use continent from geolocation
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
API:
API:
   -a, --api            [-p PREFIX][-R][-S/-B|-G BRANCH][-P PROTO [PROTO ...]]
   -a, --api            [-p PREFIX][-R][-S/-B|-G BRANCH][-P PROTO [PROTO ...]]
Line 146: Line 222:
   -R, --re-branch      API: Replace branch in mirrorlist
   -R, --re-branch      API: Replace branch in mirrorlist
   -U, --url URL        API: Replace mirror url in mirrorlist
   -U, --url URL        API: Replace mirror url in mirrorlist
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
MISC:
MISC:
   -G, --get-branch      Return branch from configuration
   -G, --get-branch      Return branch from configuration
Line 169: Line 247:
   --use-async          Experimental async mirror test.
   --use-async          Experimental async mirror test.
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Files used by pacman-mirrors===
===Files used by pacman-mirrors===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample - can be changed by pacman-mirrors api commands)</small>====
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample - can be changed by pacman-mirrors api commands)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a default configuration - click the link to the right --->
To view the content of a default configuration - click the link to the right --->
Line 184: Line 268:
     ## /etc/pacman-mirrors.conf
     ## /etc/pacman-mirrors.conf
     ##
     ##
</div>


     ## Branch Pacman should use (stable, testing, unstable)
     <div lang="en" dir="ltr" class="mw-content-ltr">
## Branch Pacman should use (stable, testing, unstable)
     # Branch = stable
     # Branch = stable
</div>


     ## Generation method
     <div lang="en" dir="ltr" class="mw-content-ltr">
## Generation method
     ## 1) rank  - rank mirrors depending on their access time
     ## 1) rank  - rank mirrors depending on their access time
     ## 2) random - randomly generate the output mirrorlist
     ## 2) random - randomly generate the output mirrorlist
     # Method = rank
     # Method = rank
</div>


     ## Define protocols and priority
     <div lang="en" dir="ltr" class="mw-content-ltr">
## Define protocols and priority
     ##  separated by comma 'https,http' or 'http,https'
     ##  separated by comma 'https,http' or 'http,https'
     ## ATM available protocols are: http, https, ftp
     ## ATM available protocols are: http, https, ftp
Line 200: Line 290:
     ## Empty means all in reversed alphabetic order
     ## Empty means all in reversed alphabetic order
     # Protocols =
     # Protocols =
</div>


     ## When set to False - all certificates are accepted.
     <div lang="en" dir="ltr" class="mw-content-ltr">
## When set to False - all certificates are accepted.
     ## Use only if you fully trust all ssl-enabled mirrors.
     ## Use only if you fully trust all ssl-enabled mirrors.
     # SSLVerify = True
     # SSLVerify = True
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/usr/share/pacman-mirrors/mirrors.json</code> <small>(sample - self updating)</small>====
====File: <code>/usr/share/pacman-mirrors/mirrors.json</code> <small>(sample - self updating)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a default mirror pool - click the link to the right --->
To view the content of a default mirror pool - click the link to the right --->
Line 770: Line 866:
]
]
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/var/lib/pacman-mirrors/status.json</code> <small>(sample - self updating)</small>====
====File: <code>/var/lib/pacman-mirrors/status.json</code> <small>(sample - self updating)</small>====
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
Line 1,796: Line 1,894:
]
]
<pre>
<pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample of default config)</small>====
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample of default config)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a default pacman-mirrors.conf - click the link to the right --->
To view the content of a default pacman-mirrors.conf - click the link to the right --->
Line 1,809: Line 1,911:
## /etc/pacman-mirrors.conf
## /etc/pacman-mirrors.conf
##
##
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Branch Pacman should use (stable, testing, unstable)
## Branch Pacman should use (stable, testing, unstable)
# Branch = stable
# Branch = stable
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Generation method
## Generation method
## 1) rank  - rank mirrors depending on their access time
## 1) rank  - rank mirrors depending on their access time
## 2) random - randomly generate the output mirrorlist
## 2) random - randomly generate the output mirrorlist
# Method = rank
# Method = rank
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Define protocols and priority
## Define protocols and priority
##  separated by comma 'https,http' or 'http,https'
##  separated by comma 'https,http' or 'http,https'
Line 1,824: Line 1,932:
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## Empty means all in reversed alphabetic order
## Empty means all in reversed alphabetic order
# Protocols =  
# Protocols =
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Get a list of all available counties with 'pacman-mirrors -l'
## Get a list of all available counties with 'pacman-mirrors -l'
## Value can be 'Custom' or nothing which means all
## Value can be 'Custom' or nothing which means all
# OnlyCountry =  
# OnlyCountry =
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## When set to False - all certificates are accepted.
## When set to False - all certificates are accepted.
## Use only if you fully trust all ssl-enabled mirrors.
## Use only if you fully trust all ssl-enabled mirrors.
# SSLVerify = True
# SSLVerify = True
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====Sample command to customize mirror pool====
====Sample command to customize mirror pool====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of the sample command - click the link to the right --->
To view the content of the sample command - click the link to the right --->
Line 1,845: Line 1,961:
~ >>> sudo pacman-mirrors --country Denmark && sudo pacman -Syyu                                                                                                         
~ >>> sudo pacman-mirrors --country Denmark && sudo pacman -Syyu                                                                                                         
.: INFO Downloading mirrors from repo.manjaro.org
.: INFO Downloading mirrors from repo.manjaro.org
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
.: INFO User generated mirror list
.: INFO User generated mirror list
--------------------------
--------------------------
Line 1,866: Line 1,984:
  der er intet at udføre
  der er intet at udføre
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/etc/pacman.d/mirrorlist</code> <small>(sample)</small>====
====File: <code>/etc/pacman.d/mirrorlist</code> <small>(sample)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of the sample mirrorlist - click the link to the right --->
To view the content of the sample mirrorlist - click the link to the right --->
Line 1,884: Line 2,006:
## To remove custom config run  'pacman-mirrors -c all'
## To remove custom config run  'pacman-mirrors -c all'
##
##
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Country : Denmark
## Country : Denmark
Server = https://www.uex.dk/public/manjaro/unstable/$repo/$arch
Server = https://www.uex.dk/public/manjaro/unstable/$repo/$arch
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Country : Denmark
## Country : Denmark
Server = https://mirrors.dotsrc.org/manjaro/unstable/$repo/$arch
Server = https://mirrors.dotsrc.org/manjaro/unstable/$repo/$arch
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/var/lib/pacman-mirrors/custom-mirrors.json</code> <small>(sample)</small>====
====File: <code>/var/lib/pacman-mirrors/custom-mirrors.json</code> <small>(sample)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a custom mirror pool - click the link to the right --->
To view the content of a custom mirror pool - click the link to the right --->
Line 1,932: Line 2,062:
]
]
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Defaults ===
=== Defaults ===
PacmanMirrors has some reasonable defaults
PacmanMirrors has some reasonable defaults
</div>


  - Ranking mirrors with the fastest mirrors on top
  <div lang="en" dir="ltr" class="mw-content-ltr">
- Ranking mirrors with the fastest mirrors on top
  - Using stable branch
  - Using stable branch
  - Using all mirrors
  - Using all mirrors
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
The '''-f''' or '''--fasttrack''' argument uses mirrors which are up-to-date for your branch. Optionally you can supply a number e.g. 10
The '''-f''' or '''--fasttrack''' argument uses mirrors which are up-to-date for your branch. Optionally you can supply a number e.g. 10
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Continent ===
=== Continent ===
The --continent argument is using a geolocation function to create a custom mirror pool from countries within the geolocated continent.
The --continent argument is using a geolocation function to create a custom mirror pool from countries within the geolocated continent.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Country ===
=== Country ===
Instead of pacman-mirrors probing all mirrors in all countries it is possible to supply a list of countries from which to use the mirrors. This creates a custom mirror pool. The countries is an example - check the country list if in doubt.
Instead of pacman-mirrors probing all mirrors in all countries it is possible to supply a list of countries from which to use the mirrors. This creates a custom mirror pool. The countries is an example - check the country list if in doubt.
</div>


  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
If a supplied country does not offer a mirrorserver the app quits with an error explaining why.
If a supplied country does not offer a mirrorserver the app quits with an error explaining why.
</div>


  $ sudo pacman-mirrors --country Antarctica && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo pacman-mirrors --country Antarctica && sudo pacman -Syu}}
  .: Info Downloading mirrors from repo.manjaro.org
  .: Info Downloading mirrors from repo.manjaro.org
  .: Warning Option '-c/--country' : unknown country: 'Antarctica'
  .: Warning Option '-c/--country' : unknown country: 'Antarctica'
Line 1,963: Line 2,109:
  Singapore, South_Africa, Sweden, Spain, Taiwan, Turkey, United_Kingdom, United_States,
  Singapore, South_Africa, Sweden, Spain, Taiwan, Turkey, United_Kingdom, United_States,
  Vietnam
  Vietnam
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
Another option for the mirrors closest to your location is '''--geoip'''
Another option for the mirrors closest to your location is '''--geoip'''
<pre>$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syyu
<pre>$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syu
:: Querying servers, this may take some time
:: Querying servers, this may take some time
=> Testing mirrors in France
=> Testing mirrors in France
Line 1,972: Line 2,120:
:: Mirrorlist generated and saved to: /etc/pacman.d/mirrorlist
:: Mirrorlist generated and saved to: /etc/pacman.d/mirrorlist
</pre>
</pre>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Customizing the mirror pool===
===Customizing the mirror pool===
If you, for various reasons, have a preference for specific mirrors, it is possible to create a personal mirror pool. This is done by supplying ''--interactive [--default]'', ''--continent-- or ''--country'' argument.
If you, for various reasons, have a preference for specific mirrors, it is possible to create a personal mirror pool. This is done by supplying ''--interactive [--default]'', ''--continent-- or ''--country'' argument.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====A word of caution====
====A word of caution====
Don't limit yourself too much. Pacman-mirrors will only use up-to-date mirrors in the final mirrorlist. Also observe this: Your custom mirror pool will not be changed - even if a mirror leaves service or becomes unmaintained. It is your reponsibility to maintain your custom mirror pool in the event the official mirrorpool is changed.
Don't limit yourself too much. Pacman-mirrors will only use up-to-date mirrors in the final mirrorlist. Also observe this: Your custom mirror pool will not be changed - even if a mirror leaves service or becomes unmaintained. It is your reponsibility to maintain your custom mirror pool in the event the official mirrorpool is changed.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Customizing pool===
===Customizing pool===
The customized pool is saved as <code>/var/lib/pacman-mirrors/custom-mirrors.json</code>
The customized pool is saved as <code>/var/lib/pacman-mirrors/custom-mirrors.json</code>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''First option''' is using ''--interactive''. It uses your current mirror pool(whether default or custom)
'''First option''' is using ''--interactive''. It uses your current mirror pool(whether default or custom)
$ sudo pacman-mirrors --interactive && sudo pacman -Syyu
{{UserCmd|command=sudo pacman-mirrors --interactive && sudo pacman -Syu}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Second option''' is using ''--interactive --default''. This force the use of the official mirror pool
'''Second option''' is using ''--interactive --default''. This force the use of the official mirror pool
$ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
{{UserCmd|command=sudo pacman-mirrors --interactive --default && sudo pacman -Syu}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Third option''' is supplying a list of countries with ''--country''. The countries is an example - check the country list if in doubt.
'''Third option''' is supplying a list of countries with ''--country''. The countries is an example - check the country list if in doubt.
$ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
{{UserCmd|command=sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Fourth option''' is ''--continent''. The countries used is determined by the continent they are assigned to and can optionally be combined with '''--interactive'''.
'''Fourth option''' is ''--continent''. The countries used is determined by the continent they are assigned to and can optionally be combined with '''--interactive'''.
$ sudo pacman-mirrors --continent [--interactive]
{{UserCmd|command=sudo pacman-mirrors --continent [--interactive]}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Using ''--interactive'' option, pacman-mirrors will process the available mirrors and present you with a list in which you will select your desired mirrors. In any case the pool is saved and used to generate a mirrorlist.
Using ''--interactive'' option, pacman-mirrors will process the available mirrors and present you with a list in which you will select your desired mirrors. In any case the pool is saved and used to generate a mirrorlist.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====Syncronization status====
====Syncronization status====
Pacman-mirrors downloads pool status for the default mirror pool. When you want to regenerate your mirrorlist, your custom pool is updated with the info from the downloaded pool status.
Pacman-mirrors downloads pool status for the default mirror pool. When you want to regenerate your mirrorlist, your custom pool is updated with the info from the downloaded pool status.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
This ensures you will '''always''' use up-to-date mirrors.
This ensures you will '''always''' use up-to-date mirrors.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Resetting and changing the custom mirror pool===
===Resetting and changing the custom mirror pool===
'''First option''' to reset is to default mirror pool
'''First option''' to reset is to default mirror pool
</div>


  $ sudo pacman-mirrors --country all && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo pacman-mirrors --country all && sudo pacman -Syu}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Second option''' to is to use ''--default'' with ''--interactive'' and creating a new custom mirror pool
'''Second option''' to is to use ''--default'' with ''--interactive'' and creating a new custom mirror pool
</div>


  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo pacman-mirrors --interactive --default && sudo pacman -Syu}}
* You will be presented with a list with all and every mirror and you can pick your selection.
* You will be presented with a list with all and every mirror and you can pick your selection.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Third option''' is to supply a list of countries and use those for a custom mirror pool.
'''Third option''' is to supply a list of countries and use those for a custom mirror pool.
The countries is an example - check the country list if in doubt.
The countries is an example - check the country list if in doubt.
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
{{UserCmd|command=sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu}}
* If you supply the same preferred countries on every reset you will get your mirror pool updated with added or removed mirrors.
* If you supply the same preferred countries on every reset you will get your mirror pool updated with added or removed mirrors.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
The '''--continent''' option has a behavior similar to '''--country'''
The '''--continent''' option has a behavior similar to '''--country'''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Apply pacman-mirrors defaults ===
=== Apply pacman-mirrors defaults ===
sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syyu
{{UserCmd|command=sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syu}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
The system will throw messages about newer packages on the system. These messages can safely be ignored and they dissappear when the installed package(s) equals the system branch.
The system will throw messages about newer packages on the system. These messages can safely be ignored and they dissappear when the installed package(s) equals the system branch.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
== manpage ==
== manpage ==
* The manpage is in section 8 (System administration commands)
* The manpage is in section 8 (System administration commands)
* [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs man page]
* [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs man page]
</div>




==FAQ==
==FAQ==
'''常见问题解答'''


===pacman-mirrors.conf===
===pacman-mirrors.conf===


<div lang="en" dir="ltr" class="mw-content-ltr">
If pacman-mirrors is updated and has a new '''pacman-mirrors.conf''', it will inform you that a new conf is saved as '''pacman-mirrors.conf.pacnew'''.
If pacman-mirrors is updated and has a new '''pacman-mirrors.conf''', it will inform you that a new conf is saved as '''pacman-mirrors.conf.pacnew'''.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
''You must manually merge changes/additions into your pacman-mirrors.conf.''
''You must manually merge changes/additions into your pacman-mirrors.conf.''
</div>


==Forum posts==
==Forum posts==
* [https://forum.manjaro.org/search?q=pacman-mirrors%20order%3Alatest Pacman-mirrors in the forum]
'''论坛帖子'''
* [https://forum.manjaro.org/search?q=pacman-mirrors%20order%3Alatest 关于 Pacman-mirrors 的更多内容,可到 Manjaro 论坛中查看……]


[[Category:System administration]]
[[Category:System administration]]

Latest revision as of 09:14, 4 August 2023

Other languages:
English • ‎français • ‎русский • ‎中文 • ‎中文(中国大陆)‎

Pacman-Mirrors

Pacman-mirrors 是一个 Manjaro 专门用于生成和维护系统镜像列表的应用程序。本文介绍以当前的 4.x 版本为准。其中,Pacman-mirrors 所提供的可用镜像,均可在镜像服务页面上查看。

目的

Manjaro 使用 pacman 实现系统维护,更新数据和安装新的软件。为了让 pacman 有效运作,一栏服务器列表,或是作为更为大多数人所熟知的镜像站,与 Manjaro 软件包是密不可分的。就像是 Manjaro 在世界各地有着许多的镜像站那样,使用离你最近的镜像站是可行的,并且最好也要用最新的(up-to-date)。

使用

为了实现大多数的功能,链接到互联网是很有必要的。从 v4 版本开始,Pacman-Mirrors 将会在网络在线时,通过查询某些通用的网站,从而进行检查。也正是由于这些站点普遍可用,所以才选择了它们。

  1. wikipedia.org
  2. github.com
  3. bitbucket.org

如果你遇到证书错误,并且pacman-mirrors抛出了网络连接缺失的信息--你必须核实你的计算机固件日期和时间,因为这可能是由于配置或CMOS电池故障而导致的完全错误。

该应用程序由具有超级用户权限的普通用户从控制台运行,当没有给出参数时,它将显示pacman-mirrors的版本,然后是当前列在镜像列表中的镜像的状态。

$ sudo pacman-mirrors

应用程序究竟如何生成镜像列表,可以通过在命令行上提供参数来添加。

重要提示

Tip
每当运行 pacman-mirrors 时,都需要你同步你的数据库,并更新你的系统。

Only in the event that Last-Modifed on the mirror is newer - pacman requests the complete file.

This can present an awkward scenario where the local metadata is newer than the mirror but it contains older content.

This inconsistency may then generate HTTP 404 Not Found errors because the local metadata could contain references to package versions which no longer exist.

The doubled yy is to mitigate such possible issues - especially when you switch branch or mirror.

It is bad practise to indiscrimately use -Syyu for update scenarios, but - pamac mirrorlist timer rewrites the mirrorlist on a weekly or bi-weekly basis - thus increasing the possibility of having inconsistent metadata - in which case the doubled yy makes sense - which is also why it is used in the pacman-mirrors man page.

To further the inconsistency - pamac uses copies of the pacman database - which has caused confusion before - pamac and pacman being in disagreement over available updates.

$ sudo pacman -Syyu

如果你不这样做,让你做出改变的问题可能不会得到解决。此外,你可能会遇到partial-updated的情况,这可能会对你的系统造成破坏。关于pacman如何工作的更多详细信息,你可以在Archlinux Wiki上阅读。

TL:DR - Samples please

All commands uses the available mirror pool.
The mirror pool can be the default full mirror pool or a customized mirror pool.
Commands for info do not require superuser - changing systemfiles do.
All samples are using the long name version of the argument. For short versions have a look at the page or the usage command

命令:展示信息

说明页

man pacman-mirrors

使用帮助

pacman-mirrors --help

版本信息

pacman-mirrors --version

镜像状态

pacman-mirrors --status

列出可用的国家和地区

基于默认的镜像源:

pacman-mirrors --country-list

基于自定义镜像源:

pacman-mirrors --country-config

所属版本分支

pacman-mirrors --get-branch

命令:使用默认镜像

更新镜像列表,以获得最快的镜像

sudo pacman-mirrors --fasttrack && sudo pacman -Syyu

限制为 5个 镜像

可以提供一个具体的数量,以此限制镜像列表中的镜像数量:

sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu

只选择你所在的国家或地区的镜像

并不是所有的国家和地区都有镜像,根据地理位置信息(geoip)返回的国家或地区,若不在镜像池中,则将会使用全部镜像。

sudo pacman-mirrors --geoip && sudo pacman -Syyu

命令:自定义镜像源

你可以根据你自己的喜好,个性化设置你的镜像源。 但是!请勿过度限制你自己,因为 pacman-mirrors 仅会 将最新的(up-to-date)镜像写入到你的镜像列表中。

根据世界地理分区,自定义镜像源

根据地址查询结果,使用所在大陆的镜像,创建一个定制的镜像源。

sudo pacman-mirrors --continent && sudo pacman -Syyu

根据国家和地区,自定义镜像源

使用德国(Germany)、法国(France)和奥地利(Austria)的镜像,创建一个定制的镜像源。

sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu

根据互动选取,自定义镜像源

Create a custom mirror pool using the --default mirror pool --interactive will list all available mirrors and procotols in a gui windows allowing to sort the columns and interactively select according to your preferences.

sudo pacman-mirrors --interactive --default && sudo pacman -Syyu

优先使用特定的传输协议

仅使用 https 和 http 协议对当前的镜像源进行排序。

sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syyu

转换为 unstable 分支,并使用德国的镜像

更改系统分支为不稳定(unstable) ,并使用德国(German)的镜像创建一个自定义镜像源。

sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syyu

转化分支,并使用德国的镜像 and use German mirrors with https

Change the system branch to unstable, set configuration to use https only and create a custom mirror pool using mirrors from Germany

sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syyu

重置

若把设置重置为默认值,你将会回到原点。

sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu

简介

Available arguments

All available arguments can be viewed by unfolding this block

➜  ~ pacman-mirrors -h      
Version 4.16.4
USAGE:
 pacman-mirrors [-h] [-f [NUMBER]] [-i [-d]] [-m METHOD] [--status]
		[-c COUNTRY [COUNTRY...] | [--geoip] | [--continent]]
		[-l] [-lc] [-q] [-t SECONDS] [-v] [-n]
		[--api] [-S/-B BRANCH] [-p PREFIX]
			[-P PROTO [PROTO...]] [-R] [-U URL]
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
METHODS:
  -i, --interactive     Generate custom mirrorlist
  -f, --fasttrack [NUMBER]
                        Generate mirrorlist with a number of up-to-date
                        mirrors. Overrides : --geoip, --method
  -c, --country COUNTRY [COUNTRY ...]
                        Comma separated list of countries, from which mirrors
                        will be used
  --geoip               Get current country using geolocation
  --continent           Use continent from geolocation
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
API:
  -a, --api             [-p PREFIX][-R][-S/-B|-G BRANCH][-P PROTO [PROTO ...]]
  -S, -B, --set-branch {stable,stable-staging,testing,unstable}
                        API: Replace branch in configuration
  -p, --prefix PREFIX   API: Set prefix to : $mnt | /mnt/install
  -P, --proto, --protocols {all,http,https,ftp,ftps} [{all,http,https,ftp,ftps} ...]
                        API: Replace protocols in configuration
  -R, --re-branch       API: Replace branch in mirrorlist
  -U, --url URL         API: Replace mirror url in mirrorlist
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
MISC:
  -G, --get-branch      Return branch from configuration
  -d, --default         INTERACTIVE: Load default mirror file
  -h, --help
  -l, --list, --country-list
                        List all available countries
  -lc, --country-config
                        lists configured mirror countries
  -m, --method {rank,random}
                        Generation method
  -n, --no-mirrorlist   Use to skip generation of mirrorlist
  -q, --quiet           Quiet mode - less verbose output
  -s, --no-status       Ignore mirror branch status
  -t, --timeout SECONDS
                        Maximum waiting time for server response
  -v, --version         Print the pacman-mirrors version
  --no-color
  --interval INTERVAL   Max. number of hours since last sync
  -g                    Create mirror list from active pool.
  --status              Status for the current mirror list.
  --use-async           Experimental async mirror test.

Files used by pacman-mirrors

File: /etc/pacman-mirrors.conf (sample - can be changed by pacman-mirrors api commands)

To view the content of a default configuration - click the link to the right --->

~ >>> cat /etc/pacman-mirrors.conf                                                                                                                                    
    ##
    ## /etc/pacman-mirrors.conf
    ##
</div>

    <div lang="en" dir="ltr" class="mw-content-ltr">
## Branch Pacman should use (stable, testing, unstable)
    # Branch = stable
</div>

    <div lang="en" dir="ltr" class="mw-content-ltr">
## Generation method
    ## 1) rank   - rank mirrors depending on their access time
    ## 2) random - randomly generate the output mirrorlist
    # Method = rank
</div>

    <div lang="en" dir="ltr" class="mw-content-ltr">
## Define protocols and priority
    ##   separated by comma 'https,http' or 'http,https'
    ## ATM available protocols are: http, https, ftp
    ## Not specifying a protocol will ban the protocol from being used
    ## If a mirror has more than one protocol defined only the first is written to the mirrorlist
    ## Empty means all in reversed alphabetic order
    # Protocols =
</div>

    <div lang="en" dir="ltr" class="mw-content-ltr">
## When set to False - all certificates are accepted.
    ## Use only if you fully trust all ssl-enabled mirrors.
    # SSLVerify = True

File: /usr/share/pacman-mirrors/mirrors.json (sample - self updating)

To view the content of a default mirror pool - click the link to the right --->

~ >>> cat /usr/share/pacman-mirrors/mirrors.json                                                                                                                                     
[
  {
    "country": "Australia",
    "url": "http://mirror.ventraip.net.au/Manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Australia",
    "url": "http://manjaro.melbourneitmirror.net/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Australia",
    "url": "http://manjaro.mirror.serversaustralia.com.au/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Austria",
    "url": "http://mirror.inode.at/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Belarus",
    "url": "http://mirror.datacenter.by/pub/mirrors/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Belgium",
    "url": "http://ftp.belnet.be/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Belgium",
    "url": "ftp://ftp.belnet.be/mirrors/manjaro/",
    "protocols": [
      "ftp"
    ]
  },
  {
    "country": "Belgium",
    "url": "https://manjaro.cu.be/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Bulgaria",
    "url": "https://mirrors.netix.net/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Bulgaria",
    "url": "https://manjaro.ipacct.com/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Bulgaria",
    "url": "http://manjaro.telecoms.bg/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Canada",
    "url": "https://osmirror.org/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Chile",
    "url": "http://manjaro.dcc.uchile.cl/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "China",
    "url": "https://mirrors.ustc.edu.cn/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "China",
    "url": "http://mirrors.tuna.tsinghua.edu.cn/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "China",
    "url": "https://mirrors.zju.edu.cn/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Colombia",
    "url": "http://mirror.edatel.net.co/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Costa_Rica",
    "url": "https://mirrors.ucr.ac.cr/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Czech",
    "url": "https://mirror.dkm.cz/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Denmark",
    "url": "https://mirrors.dotsrc.org/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Denmark",
    "url": "https://www.uex.dk/public/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Ecuador",
    "url": "https://mirror.cedia.org.ec/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Ecuador",
    "url": "https://mirror.espoch.edu.ec/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "France",
    "url": "http://mirror.lignux.com/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "France",
    "url": "http://ftp.free.org/mirrors/repo.manjaro.org/repos/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "France",
    "url": "https://fr.mirror.babylon.network/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "France",
    "url": "http://kibo.remi.lu/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Germany",
    "url": "http://mirror.ragenetwork.de/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Germany",
    "url": "https://ftp.halifax.rwth-aachen.de/manjaro/",
    "protocols": [
      "ftp",
      "https"
    ]
  },
  {
    "country": "Germany",
    "url": "http://ftp.tu-chemnitz.de/pub/linux/manjaro/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "Germany",
    "url": "https://mirror.netzspielplatz.de/manjaro/packages/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Germany",
    "url": "https://mirror.netcologne.de/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Germany",
    "url": "https://repo.rhindon.net/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Germany",
    "url": "https://repo.stdout.net/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Germany",
    "url": "https://mirror.alpix.eu/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Germany",
    "url": "https://manjaro-mirror-a.alpix.eu/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Germany",
    "url": "http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "Germany",
    "url": "http://babyname.tips/mirrors/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Hong_Kong",
    "url": "http://ftp.cuhk.edu.hk/pub/Linux/manjaro/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "Hungary",
    "url": "http://mirror.infotronik.hu/mirrors/pub/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Indonesia",
    "url": "http://kambing.ui.ac.id/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Indonesia",
    "url": "http://kartolo.sby.datautama.net.id/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Ireland",
    "url": "https://ftp.heanet.ie/mirrors/manjaro/",
    "protocols": [
      "ftp",
      "https"
    ]
  },
  {
    "country": "Italy",
    "url": "https://manjaro.mirror.garr.it/mirrors/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Italy",
    "url": "https://ba.mirror.garr.it/mirrors/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Italy",
    "url": "https://ct.mirror.garr.it/mirrors/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Japan",
    "url": "http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Japan",
    "url": "http://ftp.riken.jp/Linux/manjaro/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "Netherlands",
    "url": "https://ftp.nluug.nl/pub/os/Linux/distr/manjaro/",
    "protocols": [
      "ftp",
      "https"
    ]
  },
  {
    "country": "Netherlands",
    "url": "http://ftp.snt.utwente.nl/pub/linux/manjaro/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "Netherlands",
    "url": "https://nl.mirror.babylon.network/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Netherlands",
    "url": "https://manjaro.mirror.wearetriple.com/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Netherlands",
    "url": "https://mirror.koddos.net/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Philippines",
    "url": "http://mirror.rise.ph/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Portugal",
    "url": "http://ftp.dei.uc.pt/pub/linux/manjaro/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "Portugal",
    "url": "http://manjaro.barata.pt/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Romania",
    "url": "http://mirrors.serverhost.ro/manjaro/packages/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Romania",
    "url": "http://ftp.lug.ro/manjaro/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "Russia",
    "url": "https://mirror.yandex.ru/mirrors/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Russia",
    "url": "http://mirror.truenetwork.ru/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Singapore",
    "url": "https://download.nus.edu.sg/mirror/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "South_Africa",
    "url": "http://mirror.is.co.za/mirrors/manjaro.org/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Sweden",
    "url": "https://ftp.lysator.liu.se/pub/manjaro/",
    "protocols": [
      "ftp",
      "https"
    ]
  },
  {
    "country": "Spain",
    "url": "http://ftp.caliu.cat/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Sweden",
    "url": "https://mirror.zetup.net/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "Taiwan",
    "url": "http://free.nchc.org.tw/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "Turkey",
    "url": "http://ftp.linux.org.tr/manjaro/",
    "protocols": [
      "ftp",
      "http"
    ]
  },
  {
    "country": "United_Kingdom",
    "url": "http://mirror.catn.com/pub/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "United_Kingdom",
    "url": "http://repo.manjaro.org.uk/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "United_Kingdom",
    "url": "https://www.mirrorservice.org/sites/repo.manjaro.org/repos/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "United_Kingdom",
    "url": "http://manjaro.mirrors.uk2.net/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "United_States",
    "url": "http://mirror.dacentec.com/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "United_States",
    "url": "http://mirror.solarvps.com/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "United_States",
    "url": "http://distro.ibiblio.org/manjaro/",
    "protocols": [
      "http"
    ]
  },
  {
    "country": "United_States",
    "url": "https://mirror.clarkson.edu/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "United_States",
    "url": "https://mirrors.ocf.berkeley.edu/manjaro/",
    "protocols": [
      "https"
    ]
  },
  {
    "country": "United_States",
    "url": "https://mirror.math.princeton.edu/pub/manjaro/",
    "protocols": [
      "https"
    ]
  }
]

File: /var/lib/pacman-mirrors/status.json (sample - self updating)

To view the content of a default mirror pool including mirror status - click the link to the right --->

~/Desktop >>> cat /var/lib/pacman-mirrors/status.json                                                                                                                                
[
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Australia",
    "last_sync": "21:08",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.ventraip.net.au/Manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Australia",
    "last_sync": "01:08",
    "protocols": [
      "http"
    ],
    "url": "http://manjaro.melbourneitmirror.net/"
  },
  {
    "branches": [
      0,
      0,
      0
    ],
    "country": "Australia",
    "last_sync": "194:40",
    "protocols": [
      "http"
    ],
    "url": "http://manjaro.mirror.serversaustralia.com.au/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Austria",
    "last_sync": "06:18",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.inode.at/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Belarus",
    "last_sync": "06:18",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.datacenter.by/pub/mirrors/manjaro/"
  },
  {
    "branches": [
      -1,
      -1,
      -1
    ],
    "country": "Belgium",
    "last_sync": -1,
    "protocols": [
      "http"
    ],
    "url": "http://ftp.belnet.be/manjaro/"
  },
  {
    "branches": [
      0,
      0,
      0
    ],
    "country": "Belgium",
    "last_sync": "138:19",
    "protocols": [
      "ftp"
    ],
    "url": "ftp://ftp.belnet.be/mirrors/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Belgium",
    "last_sync": "06:19",
    "protocols": [
      "https"
    ],
    "url": "https://manjaro.cu.be/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Bulgaria",
    "last_sync": "00:49",
    "protocols": [
      "https"
    ],
    "url": "https://mirrors.netix.net/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Bulgaria",
    "last_sync": "00:19",
    "protocols": [
      "https"
    ],
    "url": "https://manjaro.ipacct.com/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Bulgaria",
    "last_sync": "02:39",
    "protocols": [
      "http"
    ],
    "url": "http://manjaro.telecoms.bg/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Canada",
    "last_sync": "00:59",
    "protocols": [
      "https"
    ],
    "url": "https://osmirror.org/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Chile",
    "last_sync": "00:49",
    "protocols": [
      "http"
    ],
    "url": "http://manjaro.dcc.uchile.cl/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "China",
    "last_sync": "05:09",
    "protocols": [
      "https"
    ],
    "url": "https://mirrors.ustc.edu.cn/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "China",
    "last_sync": "05:09",
    "protocols": [
      "http"
    ],
    "url": "http://mirrors.tuna.tsinghua.edu.cn/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "China",
    "last_sync": "05:09",
    "protocols": [
      "https"
    ],
    "url": "https://mirrors.zju.edu.cn/manjaro/"
  },
  {
    "branches": [
      0,
      0,
      0
    ],
    "country": "Colombia",
    "last_sync": "2163:33",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.edatel.net.co/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Costa_Rica",
    "last_sync": "03:39",
    "protocols": [
      "https"
    ],
    "url": "https://mirrors.ucr.ac.cr/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Czech",
    "last_sync": "06:19",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.dkm.cz/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Denmark",
    "last_sync": "00:59",
    "protocols": [
      "https"
    ],
    "url": "https://mirrors.dotsrc.org/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Denmark",
    "last_sync": "00:09",
    "protocols": [
      "https"
    ],
    "url": "https://www.uex.dk/public/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Ecuador",
    "last_sync": "02:49",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.cedia.org.ec/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Ecuador",
    "last_sync": "01:29",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.espoch.edu.ec/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "France",
    "last_sync": "01:39",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.lignux.com/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "France",
    "last_sync": "04:59",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.free.org/mirrors/repo.manjaro.org/repos/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "France",
    "last_sync": "00:49",
    "protocols": [
      "https"
    ],
    "url": "https://fr.mirror.babylon.network/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "France",
    "last_sync": "00:19",
    "protocols": [
      "http"
    ],
    "url": "http://kibo.remi.lu/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Germany",
    "last_sync": "00:49",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.ragenetwork.de/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Germany",
    "last_sync": "00:19",
    "protocols": [
      "ftp",
      "https"
    ],
    "url": "https://ftp.halifax.rwth-aachen.de/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Germany",
    "last_sync": "04:59",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.tu-chemnitz.de/pub/linux/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Germany",
    "last_sync": "00:09",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.netzspielplatz.de/manjaro/packages/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Germany",
    "last_sync": "05:19",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.netcologne.de/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Germany",
    "last_sync": "06:40",
    "protocols": [
      "https"
    ],
    "url": "https://repo.rhindon.net/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Germany",
    "last_sync": "00:09",
    "protocols": [
      "https"
    ],
    "url": "https://repo.stdout.net/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Germany",
    "last_sync": "00:09",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.alpix.eu/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Germany",
    "last_sync": "00:09",
    "protocols": [
      "https"
    ],
    "url": "https://manjaro-mirror-a.alpix.eu/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Germany",
    "last_sync": "06:50",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Germany",
    "last_sync": "18:20",
    "protocols": [
      "http"
    ],
    "url": "http://babyname.tips/mirrors/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Hong_Kong",
    "last_sync": "09:10",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.cuhk.edu.hk/pub/Linux/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Hungary",
    "last_sync": "06:20",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.infotronik.hu/mirrors/pub/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Indonesia",
    "last_sync": "20:20",
    "protocols": [
      "http"
    ],
    "url": "http://kambing.ui.ac.id/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Indonesia",
    "last_sync": "03:00",
    "protocols": [
      "http"
    ],
    "url": "http://kartolo.sby.datautama.net.id/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Ireland",
    "last_sync": "05:40",
    "protocols": [
      "ftp",
      "https"
    ],
    "url": "https://ftp.heanet.ie/mirrors/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Italy",
    "last_sync": "10:00",
    "protocols": [
      "https"
    ],
    "url": "https://manjaro.mirror.garr.it/mirrors/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Italy",
    "last_sync": "10:00",
    "protocols": [
      "https"
    ],
    "url": "https://ba.mirror.garr.it/mirrors/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Italy",
    "last_sync": "10:00",
    "protocols": [
      "https"
    ],
    "url": "https://ct.mirror.garr.it/mirrors/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Japan",
    "last_sync": "01:10",
    "protocols": [
      "http"
    ],
    "url": "http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Japan",
    "last_sync": "12:20",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.riken.jp/Linux/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Netherlands",
    "last_sync": "04:40",
    "protocols": [
      "ftp",
      "https"
    ],
    "url": "https://ftp.nluug.nl/pub/os/Linux/distr/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Netherlands",
    "last_sync": "06:20",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.snt.utwente.nl/pub/linux/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Netherlands",
    "last_sync": "00:50",
    "protocols": [
      "https"
    ],
    "url": "https://nl.mirror.babylon.network/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Netherlands",
    "last_sync": "04:50",
    "protocols": [
      "https"
    ],
    "url": "https://manjaro.mirror.wearetriple.com/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Netherlands",
    "last_sync": "04:40",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.koddos.net/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Philippines",
    "last_sync": "05:10",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.rise.ph/manjaro/"
  },
  {
    "branches": [
      0,
      0,
      0
    ],
    "country": "Portugal",
    "last_sync": "271:12",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.dei.uc.pt/pub/linux/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Portugal",
    "last_sync": "00:40",
    "protocols": [
      "http"
    ],
    "url": "http://manjaro.barata.pt/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Romania",
    "last_sync": "12:20",
    "protocols": [
      "http"
    ],
    "url": "http://mirrors.serverhost.ro/manjaro/packages/"
  },
  {
    "branches": [
      -1,
      -1,
      -1
    ],
    "country": "Romania",
    "last_sync": -1,
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.lug.ro/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Russia",
    "last_sync": "03:00",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.yandex.ru/mirrors/manjaro/"
  },
  {
    "branches": [
      0,
      0,
      0
    ],
    "country": "Russia",
    "last_sync": "126:11",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.truenetwork.ru/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Singapore",
    "last_sync": "13:10",
    "protocols": [
      "https"
    ],
    "url": "https://download.nus.edu.sg/mirror/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "South_Africa",
    "last_sync": "03:10",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.is.co.za/mirrors/manjaro.org/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Sweden",
    "last_sync": "00:40",
    "protocols": [
      "ftp",
      "https"
    ],
    "url": "https://ftp.lysator.liu.se/pub/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Spain",
    "last_sync": "04:00",
    "protocols": [
      "http"
    ],
    "url": "http://ftp.caliu.cat/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Sweden",
    "last_sync": "02:40",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.zetup.net/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Taiwan",
    "last_sync": "04:00",
    "protocols": [
      "http"
    ],
    "url": "http://free.nchc.org.tw/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "Turkey",
    "last_sync": "06:20",
    "protocols": [
      "ftp",
      "http"
    ],
    "url": "http://ftp.linux.org.tr/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "United_Kingdom",
    "last_sync": "01:10",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.catn.com/pub/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "United_Kingdom",
    "last_sync": "00:40",
    "protocols": [
      "http"
    ],
    "url": "http://repo.manjaro.org.uk/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "United_Kingdom",
    "last_sync": "05:20",
    "protocols": [
      "https"
    ],
    "url": "https://www.mirrorservice.org/sites/repo.manjaro.org/repos/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "United_Kingdom",
    "last_sync": "00:50",
    "protocols": [
      "http"
    ],
    "url": "http://manjaro.mirrors.uk2.net/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "United_States",
    "last_sync": "00:30",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.dacentec.com/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "United_States",
    "last_sync": "06:21",
    "protocols": [
      "http"
    ],
    "url": "http://mirror.solarvps.com/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "United_States",
    "last_sync": "00:11",
    "protocols": [
      "http"
    ],
    "url": "http://distro.ibiblio.org/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "United_States",
    "last_sync": "01:51",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.clarkson.edu/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      0
    ],
    "country": "United_States",
    "last_sync": "01:51",
    "protocols": [
      "https"
    ],
    "url": "https://mirrors.ocf.berkeley.edu/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "United_States",
    "last_sync": "00:41",
    "protocols": [
      "https"
    ],
    "url": "https://mirror.math.princeton.edu/pub/manjaro/"
  }
]
<pre>
</div>
</div>
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample of default config)</small>====
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a default pacman-mirrors.conf - click the link to the right --->
<div class="mw-collapsible-content">
<pre>
~ >>> cat /etc/pacman-mirrors.conf                                                                                                                                                   
##
## /etc/pacman-mirrors.conf
##
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
## Branch Pacman should use (stable, testing, unstable)
# Branch = stable
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
## Generation method
## 1) rank   - rank mirrors depending on their access time
## 2) random - randomly generate the output mirrorlist
# Method = rank
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
## Define protocols and priority
##   separated by comma 'https,http' or 'http,https'
## ATM available protocols are: http, https, ftp
## Not specifying a protocol will ban the protocol from being used
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## Empty means all in reversed alphabetic order
# Protocols =
</div> 

<div lang="en" dir="ltr" class="mw-content-ltr">
## Get a list of all available counties with 'pacman-mirrors -l'
## Value can be 'Custom' or nothing which means all
# OnlyCountry =
</div> 

<div lang="en" dir="ltr" class="mw-content-ltr">
## When set to False - all certificates are accepted.
## Use only if you fully trust all ssl-enabled mirrors.
# SSLVerify = True

Sample command to customize mirror pool

To view the content of the sample command - click the link to the right --->

~ >>> sudo pacman-mirrors --country Denmark && sudo pacman -Syyu                                                                                                         
.: INFO Downloading mirrors from repo.manjaro.org
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
.: INFO User generated mirror list
--------------------------
.: INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
.: INFO Using custom mirror file
.: INFO Querying mirrors - This may take some time
   0.091 Denmark        : https://mirrors.dotsrc.org/manjaro/
   0.075 Denmark        : https://www.uex.dk/public/manjaro/
.: INFO Writing mirror list
   Denmark         : https://www.uex.dk/public/manjaro/unstable/$repo/$arch
   Denmark         : https://mirrors.dotsrc.org/manjaro/unstable/$repo/$arch
.: INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
.: INFO To remove custom config run  'sudo pacman-mirrors -c all'
:: Synkroniserer pakkedatabaser...
 core                          143,1 KiB  10,7M/s 00:00 [##############################] 100%
 extra                        1719,8 KiB  10,3M/s 00:00 [##############################] 100%
 community                       4,5 MiB  11,0M/s 00:00 [##############################] 100%
 multilib                      177,7 KiB  13,3M/s 00:00 [##############################] 100%
:: Starter fuld systemopgradering...
 der er intet at udføre

File: /etc/pacman.d/mirrorlist (sample)

To view the content of the sample mirrorlist - click the link to the right --->

~ >>> cat /etc/pacman.d/mirrorlist                                                                                                                                                   
##
## Manjaro Linux custom mirrorlist
## Generated on 2017-11-08 10:59
##
## Please use 'pacman-mirrors -id' to reset custom mirrorlist
## Please use 'pacman-mirrors -c all' to reset custom mirrorlist
## To remove custom config run  'pacman-mirrors -c all'
##
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
## Country : Denmark
Server = https://www.uex.dk/public/manjaro/unstable/$repo/$arch
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
## Country : Denmark
Server = https://mirrors.dotsrc.org/manjaro/unstable/$repo/$arch

File: /var/lib/pacman-mirrors/custom-mirrors.json (sample)

To view the content of a custom mirror pool - click the link to the right --->

~ >>> cat /var/lib/pacman-mirrors/custom-mirrors.json                                                                                                                                
[
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Denmark",
    "last_sync": "00:59",
    "protocols": [
      "https"
    ],
    "resp_time": "00.00",
    "url": "https://mirrors.dotsrc.org/manjaro/"
  },
  {
    "branches": [
      1,
      1,
      1
    ],
    "country": "Denmark",
    "last_sync": "00:09",
    "protocols": [
      "https"
    ],
    "resp_time": "00.00",
    "url": "https://www.uex.dk/public/manjaro/"
  }
]

Defaults

PacmanMirrors has some reasonable defaults

- Ranking mirrors with the fastest mirrors on top

- Using stable branch
- Using all mirrors

The -f or --fasttrack argument uses mirrors which are up-to-date for your branch. Optionally you can supply a number e.g. 10

Continent

The --continent argument is using a geolocation function to create a custom mirror pool from countries within the geolocated continent.

Country

Instead of pacman-mirrors probing all mirrors in all countries it is possible to supply a list of countries from which to use the mirrors. This creates a custom mirror pool. The countries is an example - check the country list if in doubt.

user $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu COPY TO CLIPBOARD

If a supplied country does not offer a mirrorserver the app quits with an error explaining why.

user $ sudo pacman-mirrors --country Antarctica && sudo pacman -Syu COPY TO CLIPBOARD

.: Info Downloading mirrors from repo.manjaro.org
.: Warning Option '-c/--country' : unknown country: 'Antarctica'
.: Info Available countries are:
Australia, Austria, Belarus, Belgium, Brasil, Bulgaria, Canada, Chile, China, Colombia,
Costa_Rica, Czech, Denmark, Ecuador, France, Germany, Greece, Hungary, Indonesia,
Ireland, Italy, Japan, Netherlands, Philippines, Poland, Portugal, Romania, Russia,
Singapore, South_Africa, Sweden, Spain, Taiwan, Turkey, United_Kingdom, United_States,
Vietnam


Another option for the mirrors closest to your location is --geoip

$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syu
:: Querying servers, this may take some time
=> Testing mirrors in France
:: Writing mirror list
:: Mirrorlist generated and saved to: /etc/pacman.d/mirrorlist

Customizing the mirror pool

If you, for various reasons, have a preference for specific mirrors, it is possible to create a personal mirror pool. This is done by supplying --interactive [--default], --continent-- or --country argument.

A word of caution

Don't limit yourself too much. Pacman-mirrors will only use up-to-date mirrors in the final mirrorlist. Also observe this: Your custom mirror pool will not be changed - even if a mirror leaves service or becomes unmaintained. It is your reponsibility to maintain your custom mirror pool in the event the official mirrorpool is changed.

Customizing pool

The customized pool is saved as /var/lib/pacman-mirrors/custom-mirrors.json

First option is using --interactive. It uses your current mirror pool(whether default or custom)

user $ sudo pacman-mirrors --interactive && sudo pacman -Syu COPY TO CLIPBOARD

Second option is using --interactive --default. This force the use of the official mirror pool

user $ sudo pacman-mirrors --interactive --default && sudo pacman -Syu COPY TO CLIPBOARD

Third option is supplying a list of countries with --country. The countries is an example - check the country list if in doubt.

user $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu COPY TO CLIPBOARD

Fourth option is --continent. The countries used is determined by the continent they are assigned to and can optionally be combined with --interactive.

user $ sudo pacman-mirrors --continent [--interactive] COPY TO CLIPBOARD

Using --interactive option, pacman-mirrors will process the available mirrors and present you with a list in which you will select your desired mirrors. In any case the pool is saved and used to generate a mirrorlist.

Syncronization status

Pacman-mirrors downloads pool status for the default mirror pool. When you want to regenerate your mirrorlist, your custom pool is updated with the info from the downloaded pool status.

This ensures you will always use up-to-date mirrors.

Resetting and changing the custom mirror pool

First option to reset is to default mirror pool

user $ sudo pacman-mirrors --country all && sudo pacman -Syu COPY TO CLIPBOARD

Second option to is to use --default with --interactive and creating a new custom mirror pool

user $ sudo pacman-mirrors --interactive --default && sudo pacman -Syu COPY TO CLIPBOARD

  • You will be presented with a list with all and every mirror and you can pick your selection.

Third option is to supply a list of countries and use those for a custom mirror pool. The countries is an example - check the country list if in doubt.

user $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu COPY TO CLIPBOARD

  • If you supply the same preferred countries on every reset you will get your mirror pool updated with added or removed mirrors.

The --continent option has a behavior similar to --country

Apply pacman-mirrors defaults

user $ sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syu COPY TO CLIPBOARD

The system will throw messages about newer packages on the system. These messages can safely be ignored and they dissappear when the installed package(s) equals the system branch.

manpage

  • The manpage is in section 8 (System administration commands)
  • man page


FAQ

常见问题解答

pacman-mirrors.conf

If pacman-mirrors is updated and has a new pacman-mirrors.conf, it will inform you that a new conf is saved as pacman-mirrors.conf.pacnew.

You must manually merge changes/additions into your pacman-mirrors.conf.

Forum posts

论坛帖子

Cookies help us deliver our services. By using our services, you agree to our use of cookies.