Using Mirror Repository for FreeBSD

Home / Using Mirror Repository for FreeBSD

Using Mirror Repository for FreeBSD

December 5, 2015 | Article | No Comments

Mirror is a server outside of official server which acts as duplicate of official server. Generally mirror utilizing a backup server that duplicates all the processes and transactions of the primary server which gives very identical content.

Choosing the nearest mirror can speed up the transfer process and thus very recommended.

In this case, mirror repository is a mirror of FreeBSD.org which provides binary, source, etc for upgrade and installation of package. In FreeBSD There are two method for installing an application: through ports collection (source), and through binary installation.

In this article we will discuss about how to use mirror repository for installation via ports or pkg_add for FreeBSD. In this case I use ITB server as my mirror repository. The url will be ftp.itb.ac.id. This might be different from you as your nearest mirror might be something else.

Also my machine would be FreeBSD 8.3 for amd64.

Using Port Collections

Edit /etc/make.conf and append this to the end of file:

MASTER_SITE_OVERRIDE=ftp://ftp.itb.ac.id/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/

Using PKG_ADD facility

To use pkg_add, we need to set environment variable PACKAGEROOT to point to our mirror server. There are two approach: using command line and editing .cshrc. To use command line, just invoke this command:

export PACKAGEROOT=ftp://ftp.itb.ac.id

But with this approach, we need to recommand everytime we want to install package via pkg_add. Another approach is editing .cshrc and which located at home directory and append the above command at the end of file.

About Author

about author

xathrya

A man who is obsessed to low level technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social media & sharing icons powered by UltimatelySocial