Change ftp server for downloading faster

fernandobsd

New Member

Reaction score: 3
Messages: 10

When I fetch a package it takes too much time, it is not my internet because when I download with Linux it is very fast.

I am from Mexico.
 

User7

Active Member

Reaction score: 8
Messages: 123

kpa

Beastie's Twin

Reaction score: 1,826
Messages: 6,318

For PKG:

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

Change: url: "pkg+http://pkg.[B]eu[/B].FreeBSD.org/${ABI}/latest", to one of them:
Code:
Mirrors you may use instead of the global pkg.FreeBSD.org:

  pkg.eu.FreeBSD.org
  pkg.us-east.FreeBSD.org
  pkg.us-west.FreeBSD.org
Now update PKG pkg update and pkg update -f

Or search the web for another mirror.

https://lists.freebsd.org/pipermail/freebsd-pkg/2013-October/000107.html
https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=7

It's better to create a /usr/local/etc/pkg/repos/FreeBSD.conf file where you override the defaults that are in /etc/pkg/FreeBSD.conf so you don't have to edit the latter. Using the /usr/local/etc/pkg.conf file for defining repositories is deprecated and strongly discouraged, you will get a warning from pkg(8) if you try to do that. This is how you would change the official FreeBSD repository to use pkg+http://pkg.eu.FreeBSD.org (save this snippet as /usr/local/etc/pkg/repos/FreeBSD.conf):

Code:
FreeBSD: {
    url: "pkg+http://pkg.eu.FreeBSD.org/${ABI}/latest",
}
Edit: Removed the incorrect mirror_type override.
 

User7

Active Member

Reaction score: 8
Messages: 123

Sorry. Not work

Code:
FreeBSD: {
  url: "http://pkg.eu.FreeBSD.org/${ABI}/latest",
  mirror_type: HTTP,
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
Code:
root@handy:/usr/home/handy # pkg update -f
Updating FreeBSD repository catalogue...
Repository FreeBSD has a wrong packagesite, need to re-create database
pkg: http://pkg.eu.FreeBSD.org/FreeBSD:10:amd64/latest/meta.txz: No address record
 

kpa

Beastie's Twin

Reaction score: 1,826
Messages: 6,318

Sorry. Not work

Code:
FreeBSD: {
  url: "http://pkg.eu.FreeBSD.org/${ABI}/latest",
  mirror_type: HTTP,
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
Code:
root@handy:/usr/home/handy # pkg update -f
Updating FreeBSD repository catalogue...
Repository FreeBSD has a wrong packagesite, need to re-create database
pkg: http://pkg.eu.FreeBSD.org/FreeBSD:10:amd64/latest/meta.txz: No address record
Aah yes, you still need the SRV for mirror_type so leave that out. I wasn't aware that pkg.eu.freebsd.org was yet another redirection via SRV site.

Code:
% drill _http._tcp.pkg.eu.freebsd.org SRV
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 54034
;; flags: qr rd ra ; QUERY: 1, ANSWER: 3, AUTHORITY: 3, ADDITIONAL: 6 
;; QUESTION SECTION:
;; _http._tcp.pkg.eu.freebsd.org.       IN      SRV

;; ANSWER SECTION:
_http._tcp.pkg.eu.freebsd.org.  60      IN      SRV     20 10 80 pkg0.nyi.freebsd.org.
_http._tcp.pkg.eu.freebsd.org.  60      IN      SRV     50 10 80 pkg0.isc.freebsd.org.
_http._tcp.pkg.eu.freebsd.org.  60      IN      SRV     10 10 80 pkg0.bme.freebsd.org.
 
Top