building a distribution server

Dan Nelson dnelson at
Sat Apr 5 03:13:58 UTC 2008

In the last episode (Apr 04), Steel City Phantom said:
> i have about 10 production servers that i want to upgrade to bsd 7
> and update all their ports in one shot.  the problem is the down
> time.  im wrapping up upgrading a 6.3 to 7 and its taken over 7 hours
> so far.  thats way too long for our machines to be down.
> the biggest slow down is the downloading of files.  just sitting
> watching things i would say 70% of the time is downloading files.  is
> there a way where i can build a distribution server that has
> everything i could possibly need to upgrade a machine from any 6.x to
> 7.0 and redo all the ports on that machine and have a cron job keep
> everything up to date on that server and when i upgrade a new
> machine, it simply goes to my internal distribution server to get the
> files.

Just make a symlink that points /usr/ports/distfiles to a common
directory over NFS.  To save space you can symlink all of /usr/ports. 
This also makes it much easer to maintain local modifications.  One way
to speed up the build process itself is with ccache.  Symlink
~root/.ccache on each server to a common location, so only the first
machine has to compile anything.  If you wanted to get fancy, you could
even build packages on one server, then use portupgrade -P to install
them on the rest of the machines.

	Dan Nelson
	dnelson at

More information about the freebsd-questions mailing list