FreeBSD Ports and Packages

From ZS64
Revision as of 23:16, 2 April 2013 by Stefan Bethke (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Installing FreeBSD ports is easy, but might take a significant amount of time, especially if you're installing a full desktop complement of packages.

Portupgrade offers to install precompiled packages instead of compiling the port locally, if such a package is available. To be able to use packages, the system needs to be configured to use an appropriate mirror.

The main setting is an environment variable that points pkg_fetch(1) to the right FreeBSD mirror:

export PKG_SITES='http://ftp2.de.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/'

I've added that to root's .profile.

Poudriere

Notes on getting poudriere to work on 9-stable:

  1. I had trouble following the standard installation directions; poudriere could not set up the jails properly. In particular, I had to create /usr/ports (inside the jail tree) and then recreate the "clean" snapshot for the jail tree, and I had to add WRKDIRPREFIX and WRKDIR to poudriere.d/make.conf (although it seems those settings are somehow overridden again).
  2. The jails poudriere creates only have lo0 configured for 127.0.0.1, so you'll need to make sure you have NAT set up to allow outgoing connections from that host to the world, in order for distfiles downloads to work properly.