Re: how to specify mirror for installation

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Sat, 27 May 2023 07:33:50 UTC
On 27/05/2023 07:58, Odhiambo Washington wrote:
> /etc/pkg/FreeBSD.conf
> 
> On Sat, May 27, 2023 at 9:01 AM hl <hlyg2023@outlook.com> wrote:
> 
>> i use "pkg install" to install, default server is very slow, 10KB/S, it
>> takes hours to install xorg or firefox
>>
>> to make matters worse, sometimes it is stalled, i have to Ctrl+C and
>> restart, partial downloading is buggy
>>
>> how can i change default server to some mirror? Thanks!

While you could edit /etc/pkg/FreeBSD.conf directly, the way you're 
meant to override the defaults from that file is to create

   /usr/local/etc/pkg/repos/FreeBSD.conf

containing just the items that you want to override.  So, to select a 
specific FreeBSD pkg mirror, you could have something like:

```
FreeBSD: {
     url: "pkg+http://http://pkg0.jinx.freebsd.org//${ABI}/quarterly"
}
```

to use the mirror in Johannesburg INX-ZA specifically.

To get a list of available mirrors, simply look at http://pkg.freebsd.org/

The FreeBSD package mirrors are configured to use GeoDNS, so you should 
get the closest available mirror to you automatically and this is almost 
always the best choice. Some mirror sites are more performant or have 
better network connectivity than others and you might get slightly 
better results by choosing one explicitly.

	Cheers,

	Matthew