FreeBSD: How To fetch the ports from fast servers

Ports randomly gets it's source server list from file located in /usr/ports/Mk/, as defined by the port maintainer. Most of the time downloading the source takes a long time if the remote server is not physically near to us.

In this case, we can tune the ports so that it fetches the sources from the nearest server. A nearer server normally means less latency and a faster connection.

The port fastest_sites will test the latency of the servers listed in /usr/ports/Mk/ The file is suitable to be included in /etc/make.conf which tell ports where to fetch the sources from.

To install fastest_sites, enter the following command:

make install clean -C /usr/ports/ports-mgmt/fastest_sites

Execute fastest_sites and redirect output to a file:

/usr/local/bin/fastest_sites > /usr/local/etc/fastest_servers.conf

To update fastest_servers.conf regularly, you can schedule it in cron :

0 4 * * * /usr/local/bin/fastest_sites > /usr/local/etc/fastest_servers.conf

Include the updated faster server list into /etc/make.conf :

echo ".include \"/usr/local/etc/fastest_servers.conf\"" >> /etc/make.conf

Now, you can proceed with the ports installation.

Print This Post Print This Post
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment


No trackbacks yet.