Author Topic: [How-To] create your custom mirrorlist  (Read 12440 times)

0 Members and 1 Guest are viewing this topic.

Offline philm

  • Core Team
  • *****
  • Posts: 10671
    • Manjaro Linux
  • Branch: Unstable
  • Desktop: XFCE
  • GPU Card: Geforce GTX 650
  • GPU driver: non-free
  • Kernel: Maintainer - so all ;)
  • Skill: Guru
[How-To] create your custom mirrorlist
« on: 26. June 2013, 21:28:54 »
Since we have many new Mirrors, which is really nice, ranking them all might take longer than before. People who want to create a custom mirrorlist containing only wanted servers can do so. pacman-mirrors will only rank them newly but don't change the servers in your mirrorlist. You may want to check time to time if new mirrors are added, which might be faster.
  • create a file called "/etc/pacman.d/mirrors/Custom" -> remember to add [Custom] as your country to the new file!
  • add your favorite mirror(s) to it.
  • enable Country Custom in /etc/pacman-mirrors.conf -> OnlyCountry=Custom
  • run pacman-mirrors -g
This is my Custom file using only the content of Germany and United_Kingdom files:

Code: [Select]
##
## Pacman Mirrorlist
##

[Custom]
Server = http://ftp.halifax.rwth-aachen.de/manjaro/$branch/$repo/$arch
Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/$branch/$repo/$arch
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/$branch/$repo/$arch
Server = http://repo.manjaro.org.uk/$branch/$repo/$arch
Server = http://www.mirrorservice.org/sites/repo.manjaro.org/repos/$branch/$repo/$arch
Server = http://mirror.catn.com/pub/manjaro/$branch/$repo/$arch
Server = http://manjaro.mirrors.uk2.net/$branch/$repo/$arch

My pacman-mirrors.conf:

Code: [Select]
[phil@manjaro ~]$ cat /etc/pacman-mirrors.conf
##
## /etc/pacman-mirrors.conf
##

## Branch Pacman should use (stable, testing, unstable)
Branch=unstable

## Generation method
## 1) rank   - rank mirrors depending on their access time
## 2) random - randomly generate the output mirrorlist
Method=rank

## Specify to use only mirrors from a specific country
## Disabled by default
OnlyCountry=Custom

## Input mirrorlist directory
MirrorlistsDir="/etc/pacman.d/mirrors"

## Output mirrorlist
OutputMirrorlist="/etc/pacman.d/mirrorlist"


That is the result:

Code: [Select]
[phil@manjaro ~]$ sudo pacman-mirrors -g
:: Querying servers, this may take some time...
:: Only country: Custom
 -> 0.206 http://ftp.halifax.rwth-aachen.de/manjaro/unstable/$repo/$arch
 -> 0.460 http://ftp.tu-chemnitz.de/pub/linux/manjaro/unstable/$repo/$arch
 -> 0.510 http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/unstable/$repo/$arch
 -> 0.680 http://repo.manjaro.org.uk/unstable/$repo/$arch
 -> ... http://www.mirrorservice.org/sites/repo.manjaro.org/repos/unstable/$repo -> 0.461 http://www.mirrorservice.org/sites/repo.manjaro.org/repos/unstable/$repo/$arch
 -> 0.420 http://mirror.catn.com/pub/manjaro/unstable/$repo/$arch
 -> 2.314 http://manjaro.mirrors.uk2.net/unstable/$repo/$arch
:: Generated and saved '/etc/pacman.d/mirrorlist' mirrorlist.
Code: [Select]
[phil@manjaro ~]$ cat /etc/pacman.d/mirrorlist
##
## Manjaro Linux repository mirrorlist
## Generated on 26 June 2013
## Use pacman-mirrors to modify
##


## Location: Custom
## Time:     0.206
Server = http://ftp.halifax.rwth-aachen.de/manjaro/unstable/$repo/$arch

## Location: Custom
## Time:     0.420
Server = http://mirror.catn.com/pub/manjaro/unstable/$repo/$arch

## Location: Custom
## Time:     0.460
Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/unstable/$repo/$arch

## Location: Custom
## Time:     0.461
Server = http://www.mirrorservice.org/sites/repo.manjaro.org/repos/unstable/$repo/$arch

## Location: Custom
## Time:     0.510
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/unstable/$repo/$arch

## Location: Custom
## Time:     0.680
Server = http://repo.manjaro.org.uk/unstable/$repo/$arch

## Location: Custom
## Time:     2.314
Server = http://manjaro.mirrors.uk2.net/unstable/$repo/$arch

Clean this guide up and wikinize it ;)
« Last Edit: 26. June 2013, 21:50:11 by philm »

Offline gabi12

  • Vollwertiges Mitglied
  • ***
  • Posts: 161
  • Branch: testing/unstable
  • Desktop: manjaro xfce
  • GPU Card: onboard intel HD 4000
  • GPU driver: free
  • Kernel: linux4.4.5-1
  • Skill: Novice
Re: [How-To] create your custom mirrorlist
« Reply #1 on: 26. June 2013, 22:45:40 »
Thank you philm for this, it works good

Offline Culinax

  • Support Team
  • ****
  • Posts: 1146
  • Branch: Unstable
  • Desktop: Awesome 3.5
  • GPU Card: NVIDIA GeForce 710M - Intel (Optimus)
  • GPU driver: Free Driver
  • Kernel: Linux315-x64
  • Skill: Intermediate
Re: [How-To] create your custom mirrorlist
« Reply #2 on: 26. June 2013, 22:48:51 »
This is a feature I have been waiting for for a long time, thank you very much!
Manjaro Awesome WM Respin: Current version: 0.8.10
Belgian/Dutch Manjaro Linux users: unite! http://manjaro-nl.org/ | IRC: #manjaro-nl

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline Culinax

  • Support Team
  • ****
  • Posts: 1146
  • Branch: Unstable
  • Desktop: Awesome 3.5
  • GPU Card: NVIDIA GeForce 710M - Intel (Optimus)
  • GPU driver: Free Driver
  • Kernel: Linux315-x64
  • Skill: Intermediate
Re: [How-To] create your custom mirrorlist
« Reply #4 on: 27. June 2013, 11:37:14 »
I was just thinking... this isn't a feature, it's more like a little hack that we could have done since day 1, right? :P
Manjaro Awesome WM Respin: Current version: 0.8.10
Belgian/Dutch Manjaro Linux users: unite! http://manjaro-nl.org/ | IRC: #manjaro-nl

Offline moumin

  • Vollwertiges Mitglied
  • ***
  • Posts: 150
  • Branch: stable
  • Desktop: xfce 4.10
  • GPU Card: intel
  • GPU driver: free
  • Kernel: linux312-x64
  • Skill: Novice
Re: [How-To] create your custom mirrorlist
« Reply #5 on: 01. July 2013, 17:41:09 »
Excuse me I'm new, but what do you mean by add your favourite mirrors? how can I obtain/choose my favourite mirrors and on what bases?!!
why is this operation different from pacman-mirrors -g?! does it save the time for example or the repetition of pacman-mirrors -g!

Offline Culinax

  • Support Team
  • ****
  • Posts: 1146
  • Branch: Unstable
  • Desktop: Awesome 3.5
  • GPU Card: NVIDIA GeForce 710M - Intel (Optimus)
  • GPU driver: Free Driver
  • Kernel: Linux315-x64
  • Skill: Intermediate
Re: [How-To] create your custom mirrorlist
« Reply #6 on: 01. July 2013, 17:48:28 »
Excuse me I'm new, but what do you mean by add your favourite mirrors? how can I obtain/choose my favourite mirrors and on what bases?!!
why is this operation different from pacman-mirrors -g?! does it save the time for example or the repetition of pacman-mirrors -g!

My favourite mirrors = the fastest mirrors. First do a normal pacman-mirrors -g, then copy the 5 or 10 fastest ones to your custom mirrorlist. The result is that you'll save a LOT of time when pacman automatically generates the mirrorlist while updating your system.
Manjaro Awesome WM Respin: Current version: 0.8.10
Belgian/Dutch Manjaro Linux users: unite! http://manjaro-nl.org/ | IRC: #manjaro-nl

Offline moumin

  • Vollwertiges Mitglied
  • ***
  • Posts: 150
  • Branch: stable
  • Desktop: xfce 4.10
  • GPU Card: intel
  • GPU driver: free
  • Kernel: linux312-x64
  • Skill: Novice

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: [How-To] create your custom mirrorlist
« Reply #8 on: 01. July 2013, 18:00:02 »
That uses the /etc/pacman.d/mirrors/* when it runs pacman-mirrors -g so apart from ranking your mirrors (unless you have changed your /etc/pacman-mirrors.conf to do otherwise) the allservers.sh script has no other effect on your mirrorlist.

If you create a /etc/pacman/mirrors/Custom file with as many of the top fastest mirrors in it as you choose, you will save time whenever pacman-mirrors -g is run. As time goes by & Manjaro gains more mirrors, you will be saving even more time.

This little time saving trick is great.
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline JoeyJoeJoe26

  • Vollwertiges Mitglied
  • ***
  • Posts: 189
  • Branch: Stable
  • Desktop: KDE
  • GPU Card: AMD Radeon R9 280X
  • GPU driver: Non-Free
  • Kernel: 4.4.6
  • Skill: Intermediate
Re: [How-To] create your custom mirrorlist
« Reply #9 on: 30. August 2013, 04:11:23 »
Thanks. But how do you get the custom file INTO that folder?
« Last Edit: 30. August 2013, 04:25:03 by JoeyJoeJoe26 »

Offline JoeyJoeJoe26

  • Vollwertiges Mitglied
  • ***
  • Posts: 189
  • Branch: Stable
  • Desktop: KDE
  • GPU Card: AMD Radeon R9 280X
  • GPU driver: Non-Free
  • Kernel: 4.4.6
  • Skill: Intermediate
Re: [How-To] create your custom mirrorlist
« Reply #10 on: 30. August 2013, 04:26:29 »
.

Offline ringo

  • Held Mitglied
  • *****
  • Posts: 9684
  • www.manjaro-nl.org
    • Manjaro Belgium + forum
  • Branch: unsourced
  • Desktop: xfce
  • GPU Card: Nvidia Geforce 8600 GT (acer 23inch)
  • GPU driver: Free*
  • Kernel: linux kernel
  • Skill: Novice
Re: [How-To] create your custom mirrorlist
« Reply #11 on: 30. August 2013, 08:47:55 »
with sudo gedit /his path/xxxx

gedit is your editor as example :) you need to be root to edit it.

Dutch go the dutch site :)

Offline JoeyJoeJoe26

  • Vollwertiges Mitglied
  • ***
  • Posts: 189
  • Branch: Stable
  • Desktop: KDE
  • GPU Card: AMD Radeon R9 280X
  • GPU driver: Non-Free
  • Kernel: 4.4.6
  • Skill: Intermediate
Re: [How-To] create your custom mirrorlist
« Reply #12 on: 01. September 2013, 20:37:50 »
with sudo gedit /his path/xxxx

gedit is your editor as example :) you need to be root to edit it.

Ah nevermind, I'll just wait however many months it takes for my stupid mirror, that for some reason Manjaro defaulted me to, to update.
« Last Edit: 01. September 2013, 20:45:51 by JoeyJoeJoe26 »

Offline ringo

  • Held Mitglied
  • *****
  • Posts: 9684
  • www.manjaro-nl.org
    • Manjaro Belgium + forum
  • Branch: unsourced
  • Desktop: xfce
  • GPU Card: Nvidia Geforce 8600 GT (acer 23inch)
  • GPU driver: Free*
  • Kernel: linux kernel
  • Skill: Novice
Re: [How-To] create your custom mirrorlist
« Reply #13 on: 02. September 2013, 17:34:54 »
look this is my  /etc/pacman.d/mirrors/

http://pastie.org/private/2kaawm8owqincztgi3dq


you see in that map Named Customs , look good :)

this is Custom

http://pastie.org/private/2k0hv9i3rvo7mke5hudcxg

as example

this is mine pacman-mirrors.conf in /etc/pacman-mirrors.conf

http://pastie.org/private/h4hfxsj3wvakhrkjfdquhq

advice dont follow unstable you will see in that file,

do you see where i added Custom ?

so by sudo pacman-mirrors -g   it generate a mirrorlist in /etc/pacman.d/mirrorlist  file that is pointen in pacman.conf :)

so is bit clear after that sudo pacman -Syy after generation !



Dutch go the dutch site :)

Offline bloomode

  • Vollwertiges Mitglied
  • ***
  • Posts: 247
  • Branch: testing
  • Desktop: varies
  • GPU Card: ATI
  • GPU driver: open source
  • Kernel: x86_64 GNU/Linux
  • Skill: Advanced
Re: [How-To] create your custom mirrorlist
« Reply #14 on: 24. September 2013, 23:23:00 »
 there is also a script called reflector in the community repo I use.
end~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ((((((((([ 'Karma..........  she always waits' ])))))))))

                        https://www.noisebridge.net/