-
Notifications
You must be signed in to change notification settings - Fork 1
/
Mirrors.txt
50 lines (38 loc) · 1.7 KB
/
Mirrors.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2016-10-22T21:44:58+02:00
====== Mirrors ======
Created lørdag 22 oktober 2016
==== Use European servers ====
**# Edit the **///etc/pacman.conf//** file. Add the following server lines before the include lines.**
{{{code: lang="texinfo" linenumbers="True"
[core]
Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch
Include = /etc/pacman.d/mirrorlist
[extra]
Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/extra/os/$arch
Include = /etc/pacman.d/mirrorlist
[community]
Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/community/os/$arch
Include = /etc/pacman.d/mirrorlist
}}}
==== Using Reflector ====
**# Reflector is a package that retrieve the latest mirror list, filter the most up-to-date -**
**# sort them by speed and overwrite the **///etc/pacman.d/mirrorlist//**.**
$ pacman -S reflector
**#** **To rate and update the mirrorlist**
$ reflector --verbose -l 30 --number 20 -p https --sort rate --save /etc/pacman.d/mirrorlist
== Automatic update mirrorlist when a new is installed (.pacnew) ==
**# You can create a pacman hook to run reflector everytime pacman-mirrorlist gets an upgrade.**
**# Create a new hook** ///etc/pacman.d/hooks/mirrorupgrade.hook//
{{{code: lang="texinfo" linenumbers="True"
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrorlist
[Action]
Description = Updating pacman-mirrorlist with reflector and removing pacnew...
When = PostTransaction
Depends = reflector
Exec = /usr/bin/env sh -c "reflector --verbose -l 30 --number 20 --age 24 --sort rate --save /etc/pacman.d/mirrorlist; if [[ -f /etc/pacman.d/mirrorlist.pacnew ]]; then rm /etc/pacman.d/mirrorlist.pacnew; fi"
}}}