Manjaro Difference between revisions of "Change to a Different Download Server"

Difference between revisions of "Change to a Different Download Server"

From Manjaro
imported>Richard
(Do not use -Syyu)
 
(29 intermediate revisions by 8 users not shown)
Line 1: Line 1:
= Overview =  
<languages/>
__TOC__
<translate>
= Overview = <!--T:1-->


{{tip| Those who installed Manjaro 0.8.0-1 will have had the fastest server automatically selected for them during the installation process, via the use of the ''Rankmirrors'' command. Those who installed Manjaro 0.8.2 will have had the UK server selected by default.}}
<!--T:2-->
The official Manjaro repositories are hosted on ''Software Servers''(also known as ''mirrors'') . Physically located throughout the world, these mirrors are responsible for receiving requests for software packages and delivering them to your system. There are therefore three primary factors that will determine how fast your downloads are:
* Your internet connection
* The speed of the mirror itself, and
* The proximity of the mirror to you, that is, how close or how far away it is from a network perspective.


<!--T:3-->
Other than upgrading your internet package or switching providers, it is therefore, potentially possible to improve the speed of downloads from the Manjaro repositories by selecting a different mirror to use.


The official Manjaro repositories (also known as ''mirrors'') are hosted on ''Software Servers''. Physically located throughout the world, these servers are responsible for receiving requests for software packages via the terminal and/or pacman-gui, and consequently delivering them to your system. There are therefore three primary factors that will determine how fast your downloads are:
<!--T:4-->
* Your internet connection
To get a list of countries currently serving mirrors use the command
* The speed of the server itself, and
* The proximity of the server to you, that is, how close or how far away it is.
 


Other than upgrading your internet package or switching providers, it is therefore, potentially possible to improve the speed of downloads from the Manjaro repositories by selecting a different server to use. Servers are currently located in the following countries:
<!--T:5-->
* Brazil
{{UserCmd|command=sudo pacman-mirrors --country-list}}
* France
* Germany
* Greece
* United Kingdom
* United States


<!--T:6-->
{{BoxSuccess|note|The geographically closest server may not always necessarily be the fastest!}}


Those who installed Manjaro 0.8.2 using the '''[[Installation_Guide_for_Beginners_0.8.2|Installation Guide for Beginners]]''' will have had the United Kingdom server set by default, irrespective of their actual country of residence. Therefore, users living in the United States may consequently achieve better results by switching to the U.S. server. Two methods to switch servers are available. The first is to manually determine the server to use, as is provided in this guide. The second is to use the ''Rankmirrors'' command to automatically determine and set the fastest possible server on your behalf, provided in the '''[[Rankmirrors to Set the Fastest Download Server|Use Rankmirrors to Set the Fastest Download Server]]''' guide.


=Updating the mirrorlist the easy way= <!--T:7-->


{{note|The closest server may not always necessarily be the fastest!}}
<!--T:8-->
The easiest method is to use '''pacman-mirrors''' which automates the process of determining the fastest mirrors and updating the mirrrorlist accordingly.<br /> 
A full description of how to use '''pacman-mirrors''' can be found one the [[Pacman-mirrors]] page.


= Step 1: Changing Servers =
=Updating the mirrorlist manually= <!--T:9-->


{{note|The contents of the mirrorlist will look different depending on when and which version of Manjaro was installed. This is because prior to the release of 0.8.2, Rankmirrors was automatically used to select the fastest server. This feature was removed with the release of 0.8.2, resulting in a cleaner and simplier looking mirrorlist.}}
<!--T:10-->
This is undertaken by amending the '''mirrorlist''' file, which is read by Manjaro's package managers, for the internet addresses of the Manjaro servers to download updates and software applications from.  




This is undertaken by amending the '''mirrorlist''' file, which is read by Manjaro's package manager, '''[[pacman]]''', for the internet addresses of the Manjaro servers to download updates and software applications from.  
== Edit the Mirrorlist == <!--T:11-->
{{BoxSuccess|tip|More than one server can be enabled. However, they will be selected in the order they are listed, and the package manager will only select another server if there is a problem with the one before it.}}


<!--T:12-->
You have a multitude of options for editing text file. Every system and every user has a preferred GUI text editor. However due to security concerns, it is difficult to launch a GUI editor to correctly edit a protected system configuration file.


== Open the Mirrorlist ==
<!--T:13-->
Therefore you need to be familiar with basic terminal usage. '''nano''' is a terminal based text editor available with all Manjaro editions that we will use as an example.


{{tip|More than one server can be enabled. However, they will be selected in the order they are listed, and ''pacman'' will only select another server if there is a problem with the one before it.}}


=== Terminal === <!--T:14-->


<!--T:15-->
You will need to first open your terminal in order to edit the mirrorlist file. The syntax of the command to edit the mirrorlist is:
You will need to first open your terminal in order to edit the mirrorlist file. The syntax of the command to edit the mirrorlist is:
sudo [text editor] /etc/pacman.d/mirrorlist
{{UserCmd|command=sudo [terminal text editor] /etc/pacman.d/mirrorlist}}
 


<!--T:16-->
For example, if you wish to edit the file within the terminal using ''nano'' (a standard terminal-based text editor) then enter:
For example, if you wish to edit the file within the terminal using ''nano'' (a standard terminal-based text editor) then enter:
sudo nano /etc/pacman.d/mirrorlist
{{UserCmd|command=sudo nano /etc/pacman.d/mirrorlist}}




However, if you have installed the full version of Manjaro (but not the NET-Edition) you may find it easier to use the pre-installed ''gedit'' text editor instead. This will open the mirrorlist file up as a document, making it easier to read and edit. To use gedit, the command is:
=== Editing the mirrorlist === <!--T:17-->
sudo gedit /etc/pacman.d/mirrorlist


== Edit the Mirrorlist (Manjaro 0.8.2 and 0.8.3) ==
<!--T:18-->
'''Lines beginning with a hash '#' will be ignored by pacman'''. Hence to disable a mirror, a comment can be put in the beginning of a line starting with ''Server''.


'''Lines beginning with a hash '#' will be ignored by pacman'''. In the example below, only the UK server is active, that is, has had the hash mark removed. It is the only server that has been enabled for use:
<!--T:19-->
##
The mirrorlist can be long generally and only a part of it is displayed below:
## Manjaro Linux repository mirrorlist
<pre>
## Generated on 2012-11-08
~ >>> cat /etc/pacman.d/mirrorlist                                                         
##
##
## Manjaro Linux default mirrorlist
## Brasil
## Generated on 2018-02-17 13:32
# Server = http://manjaro.fis.unb.br/$repo/$arch
##
## Please use 'pacman-mirrors -f [NUMBER]' to modify mirrorlist
## France
##
# Server = http://manjarolinux.polymorf.fr/$repo/$arch
## Germany
# Server = http://mirrors.mycraft.eu/manjaro/$repo/$arch
# Server = http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch
# Server = http://mirror.vinzv.de/manjaro/repo/$repo/$arch
## Greece
# Server = http://ftp.cc.uoc.gr/mirrors/linux/manjaro/$repo/$arch
'''## United Kingdom'''
'''<font color="green">Server =</font color> http://repo.manjaro.org.uk/$repo/$arch'''
## United States
# Server = http://mirror.dacentec.com/manjaro/$repo/$arch


<!--T:20-->
## Country : Germany
Server = https://mirror.philpot.de/manjaro/unstable/$repo/$arch


The United Kingdom Server can therefore be disabled by simply placing a hash at the beginning of the '''Server=''' line. Another Server can be enabled in turn by removing its hash at the beginning of the appropriate line. In the instance below, the United Kingdom server has been disabled, and the United States Sever has been enabled:
<!--T:21-->
##
## Country : Denmark
## Manjaro Linux repository mirrorlist
Server = https://www.uex.dk/public/manjaro/unstable/$repo/$arch
## Generated on 2012-11-08
##
## Brasil
# Server = http://manjaro.fis.unb.br/$repo/$arch
## France
# Server = http://manjarolinux.polymorf.fr/$repo/$arch
## Germany
# Server = http://mirrors.mycraft.eu/manjaro/$repo/$arch
# Server = http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch
# Server = http://mirror.vinzv.de/manjaro/repo/$repo/$arch
## Greece
# Server = http://ftp.cc.uoc.gr/mirrors/linux/manjaro/$repo/$arch
## United Kingdom
'''#''' Server = http://repo.manjaro.org.uk/$repo/$arch
'''## United States'''
'''<font color="green">Server =</font color> http://mirror.dacentec.com/manjaro/$repo/$arch'''


<!--T:22-->
## Country : United_Kingdom
Server = http://manjaro.mirrors.uk2.net/unstable/$repo/$arch


{{warning|Do not remove hashes from the lines that contain the names of the server countries.}}
<!--T:23-->
## Country : Poland
Server = https://mirror.tuchola-dc.pl/manjaro/unstable/$repo/$arch


<!--T:24-->
## Country : Germany
Server = http://mirror.ragenetwork.de/manjaro/unstable/$repo/$arch


Once you have disabled and/or enabled the desired server(s), save the changes and close the mirrorlist as follows:
<!--T:25-->
*'''nano''': Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
## Country : Netherlands
*'''gedit''': Select the 'save' option and then close the window.
Server = https://mirror.koddos.net/manjaro/unstable/$repo/$arch


<!--T:26-->
## Country : Netherlands
Server = https://manjaro.mirror.wearetriple.com/unstable/$repo/$arch


'''Now, all that is required is to Synchronise the newly enabled server(s)''':
<!--T:27-->
## Country : Germany
Server = https://mirror.alpix.eu/manjaro/unstable/$repo/$arch


sudo pacman -Syy
<!--T:28-->
## Country : Netherlands
Server = https://mirror.neostrada.nl/manjaro/unstable/$repo/$arch


== Edit the Mirrorlist (Manjaro 0.8.0 and 0.8.1) ==
<!--T:29-->
## Country : United_Kingdom
Server = https://www.mirrorservice.org/sites/repo.manjaro.org/repos/unstable/$repo/$arch


{{tip|If you find the contents too confusing, then you may wish to consider replacing them with the example provided above for Manjaro 0.8.2. You may gain an additional server or two (i.e. Brazil and Germany) in the process. Otherwise, you could add these servers to your existing file; copying and pasting from the above example will work.}}
<!--T:30-->
#----->snipped
</pre>
{{BoxSuccess|note|Do not remove hashes from the lines that contain the names of the server countries.}}


Once opened, the mirrorlist file presented should look similar to this (text has been coloured for illustrative purposes):


# Server list generated by rankmirrors on 2012-10-07
<!--T:31-->
##
Once you have disabled and/or enabled the desired server(s), save the changes and close the mirrorlist.
## Manjaro Linux repository mirrorlist
## Generated on 2012-09-11
##
## France
# http://manjarolinux.polymorf.fr/$repo/$arch <font color="red">... 0.494</font color>
## Germany
# http://mirrors.mycraft.eu/manjaro/$repo/$arch <font color="red">... 0.367</font color>
# http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch <font color="red">... 0.300</font color>
## Greece
# http://ftp.cc.uoc.gr/mirrors/linux/manjaro/$repo/$arch <font color="red">... 0.769</font color>
## United Kingdom
# http://repo.manjaro.org.uk/$repo/$arch <font color="red">... 0.518</font color>
## United States
# http://mirror.dacentec.com/manjaro/$repo/$arch <font color="red">... 0.887</font color>


'''<font color="green">Server =</font color> http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch'''
'''<font color="green">Server =</font color> http://mirrors.mycraft.eu/manjaro/$repo/$arch'''
'''<font color="green">Server =</font color> http://manjarolinux.polymorf.fr/$repo/$arch'''
'''<font color="green">Server =</font color> http://repo.manjaro.org.uk/$repo/$arch'''


= Step 2: Synchronising with the Newly Enabled Server(s) = <!--T:32-->


'''Lines beginning with a hash '#' will be ignored by pacman.''' As such, the top part of the file is a table that lists the names of countries followed by their server internet addresses purely for your own information. Its purpose is to tell you --not pacman-- which servers are available in what countries. The text coloured in <font color="red">red</font color> at the end of each internet address is there to tell you the <font color="red">download speed</font color> of the server. It is actually the bottom part of the file that is intended to be used by pacman to connect to the Manjaro servers. Notice that each of these lines does not have a hash, and begins with the command <font color="green">Server =</font color>. They are also accessed in the order that they are listed.
<!--T:34-->
 
Remember, speeds of servers may be relative to your local internet providers speed, which may vary during the day. Make a backup copy, such as mirrorlist.bak before editing mirrorlist, for comparison purposes.
 
Any of the servers listed at the bottom of the file may be disabled by placing a hash at the beginning of the appropriate line. The order they are used may also be changed by changing the order that they are listed. '''If you wish to use any of the servers listed in the table above instead''':
 
* start the server address line with the <font color="green">Server =</font color> command, and
* remove the text that tells you the <font color="red">download speed</font> of the server (e.g. '<font color="red">... 0.769</font color>')
 
 
In the following example, the servers at the bottom of the file have been disabled, and the United Kingdom Server has been enabled in the above table instead:
 
# Server list generated by rankmirrors on 2012-10-07
##
## Manjaro Linux repository mirrorlist
## Generated on 2012-09-11
##
## France
# http://manjarolinux.polymorf.fr/$repo/$arch <font color="red">... 0.494</font color>
## Germany
# http://mirrors.mycraft.eu/manjaro/$repo/$arch <font color="red">... 0.367</font color>
# http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch <font color="red">... 0.300</font color>
## Greece
# http://ftp.cc.uoc.gr/mirrors/linux/manjaro/$repo/$arch <font color="red">... 0.769</font color>
'''## United Kingdom'''
'''<font color="green">Server =</font color> http://repo.manjaro.org.uk/$repo/$arch'''
## United States
# http://mirror.dacentec.com/manjaro/$repo/$arch <font color="red">... 0.887</font color>
# Server = http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch
# Server = http://mirrors.mycraft.eu/manjaro/$repo/$arch
# Server = http://manjarolinux.polymorf.fr/$repo/$arch
# Server = http://repo.manjaro.org.uk/$repo/$arch
 
 
Once you have disabled and/or enabled the desired server(s), save the changes and close the mirrorlist by:
 
*'''nano''': Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
*'''gedit''': Select the 'save' option and then close the window.
 
 
'''All that is required now is to Synchronise with the newly enabled server(s)'''.
 
= Step 2: Synchronising with the Newly Enabled Server(s) =
 
Your Manjaro system has a database of all the software packages that are available from the official repositories. These are used by pacman to locate and download them for installation. Synchronising your database after changing servers will therefore ensure that it is up to date, and avoid any potential problems when subsequently downloading software packages.
Your Manjaro system has a database of all the software packages that are available from the official repositories. These are used by pacman to locate and download them for installation. Synchronising your database after changing servers will therefore ensure that it is up to date, and avoid any potential problems when subsequently downloading software packages.


<!--T:35-->
To synchronise your database with the Manjaro repositories, enter the following command in the terminal:
To synchronise your database with the Manjaro repositories, enter the following command in the terminal:


  sudo pacman -Syy
  <!--T:36-->
 
{{UserCmd|command=sudo pacman -Syu}}


<!--T:37-->
Once the Mirrorlist has been amended and the database synchronised, the change will be immediate. There will be no need to reboot your system for the change to take effect.
Once the Mirrorlist has been amended and the database synchronised, the change will be immediate. There will be no need to reboot your system for the change to take effect.


= See Also = <!--T:38-->


= See Also =
<!--T:39-->
 
* [[Pacman-mirrors|Reference Guide to pacman-mirrrors]]
* '''[[Pacman troubleshooting]]'''
</translate>
* '''[[Rankmirrors to Set the Fastest Download Server|Use Rankmirrors to Set the Fastest Download Server]]'''
 
 


[[Category:Contents Page]]
[[Category:Contents Page{{#translation:}}]]
[[Category:Download{{#translation:}}]]

Latest revision as of 21:53, 9 October 2023

Other languages:
English • ‎Türkçe • ‎русский

Overview

The official Manjaro repositories are hosted on Software Servers(also known as mirrors) . Physically located throughout the world, these mirrors are responsible for receiving requests for software packages and delivering them to your system. There are therefore three primary factors that will determine how fast your downloads are:

  • Your internet connection
  • The speed of the mirror itself, and
  • The proximity of the mirror to you, that is, how close or how far away it is from a network perspective.

Other than upgrading your internet package or switching providers, it is therefore, potentially possible to improve the speed of downloads from the Manjaro repositories by selecting a different mirror to use.

To get a list of countries currently serving mirrors use the command

user $ sudo pacman-mirrors --country-list COPY TO CLIPBOARD



note
The geographically closest server may not always necessarily be the fastest!


Updating the mirrorlist the easy way

The easiest method is to use pacman-mirrors which automates the process of determining the fastest mirrors and updating the mirrrorlist accordingly.
A full description of how to use pacman-mirrors can be found one the Pacman-mirrors page.

Updating the mirrorlist manually

This is undertaken by amending the mirrorlist file, which is read by Manjaro's package managers, for the internet addresses of the Manjaro servers to download updates and software applications from.


Edit the Mirrorlist

tip
More than one server can be enabled. However, they will be selected in the order they are listed, and the package manager will only select another server if there is a problem with the one before it.

You have a multitude of options for editing text file. Every system and every user has a preferred GUI text editor. However due to security concerns, it is difficult to launch a GUI editor to correctly edit a protected system configuration file.

Therefore you need to be familiar with basic terminal usage. nano is a terminal based text editor available with all Manjaro editions that we will use as an example.


Terminal

You will need to first open your terminal in order to edit the mirrorlist file. The syntax of the command to edit the mirrorlist is:

user $ sudo [terminal text editor] /etc/pacman.d/mirrorlist COPY TO CLIPBOARD


For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:

user $ sudo nano /etc/pacman.d/mirrorlist COPY TO CLIPBOARD



Editing the mirrorlist

Lines beginning with a hash '#' will be ignored by pacman. Hence to disable a mirror, a comment can be put in the beginning of a line starting with Server.

The mirrorlist can be long generally and only a part of it is displayed below:

~ >>> cat /etc/pacman.d/mirrorlist                                                          
##
## Manjaro Linux default mirrorlist
## Generated on 2018-02-17 13:32
##
## Please use 'pacman-mirrors -f [NUMBER]' to modify mirrorlist
##

## Country : Germany
Server = https://mirror.philpot.de/manjaro/unstable/$repo/$arch

## Country : Denmark
Server = https://www.uex.dk/public/manjaro/unstable/$repo/$arch

## Country : United_Kingdom
Server = http://manjaro.mirrors.uk2.net/unstable/$repo/$arch

## Country : Poland
Server = https://mirror.tuchola-dc.pl/manjaro/unstable/$repo/$arch

## Country : Germany
Server = http://mirror.ragenetwork.de/manjaro/unstable/$repo/$arch

## Country : Netherlands
Server = https://mirror.koddos.net/manjaro/unstable/$repo/$arch

## Country : Netherlands
Server = https://manjaro.mirror.wearetriple.com/unstable/$repo/$arch

## Country : Germany
Server = https://mirror.alpix.eu/manjaro/unstable/$repo/$arch

## Country : Netherlands
Server = https://mirror.neostrada.nl/manjaro/unstable/$repo/$arch

## Country : United_Kingdom
Server = https://www.mirrorservice.org/sites/repo.manjaro.org/repos/unstable/$repo/$arch

#----->snipped
note
Do not remove hashes from the lines that contain the names of the server countries.


Once you have disabled and/or enabled the desired server(s), save the changes and close the mirrorlist.


Step 2: Synchronising with the Newly Enabled Server(s)

Your Manjaro system has a database of all the software packages that are available from the official repositories. These are used by pacman to locate and download them for installation. Synchronising your database after changing servers will therefore ensure that it is up to date, and avoid any potential problems when subsequently downloading software packages.

To synchronise your database with the Manjaro repositories, enter the following command in the terminal:

user $ sudo pacman -Syu COPY TO CLIPBOARD


Once the Mirrorlist has been amended and the database synchronised, the change will be immediate. There will be no need to reboot your system for the change to take effect.

See Also

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