msgbartop
msgbarbottom

06 Jul 09 Upcoming in FreeBSD 8.x

A friend of mine shot me this article today (What’s cooking for FreeBSD 8?), which is a pretty detailed outline of the things coming up for FreeBSD 8. I have to say, some of the things have got be excited! Some of the highlights that I want to see:

There is actually quite a bit more, but those are the immediate ones that look like they’d noticeably affect me. I’d really love to have FreeBSD setup on a VPS via Xen, with Jails for each of my services. Currently I have that setup at home (jails), but its on old hardware that takes forever to compile. Parallel Ports Build would sure be a nice improvement, assuming the hardware can handle it (which my current hardware cannot).

To any of you other FreeBSD users out there, what are you excited for in the list and why?

Tags: , , ,

21 Feb 09 Weekly Update Notifications via Portmaster

Update: I have suggested a minor improvement to this setup.  Read More

For some time now I’ve been maintaining about a dozen FreeBSD jails, each running a different set of services. Everything from email to BIND, DHCP to nagios. One of the difficulties of trying to maintain so many servers has been tracking and applying updates, particularly servers that use the ports system which is updated so frequently.

The solution that I’ve come up with is to use portmaster inside a weekly cron job to notify me of available updates on each machine. This requires a slightly different cron job on the host system that within the jails. Here is an example of what I’m running within each:

#!/usr/local/bin/bash

/usr/sbin/portsnap cron
/usr/local/bin/ezjail-admin update -P

/usr/local/sbin/portmaster -L | egrep -B1 ‘(ew|ort) version|Aborting|installed|dependencies|IGNORE|marked|reason:|MOVED’ | grep -v ‘^–’ | mail -s “Portmaster Weekly Check for $(hostname)” admin@domain.tld


#!/usr/local/bin/bash

/usr/local/sbin/portmaster -L | egrep -B1 ‘(ew|ort) version|Aborting|installed|dependencies|IGNORE|marked|reason:|MOVED’ | grep -v ‘^–’ | mail -s “Portmaster Weekly Check for $(hostname)” admin@domain.tld

As you can probably tell, the only major difference between the two is that the cron job as run on the host system also updates the ports tree prior to checking for updates. The cron job within the jail system simply runs the check.

I save these two scripts inside /etc/periodic/weekly/999.portmaster and make them executable.  From that point on I’m notified via email regarding updates available to my installed ports.

I’d be interested in hearing what solutions others have come up with for monitoring and maintaining ports updates from so many FreeBSD servers.

Tags: , , ,

27 Nov 08 update your system (and ports) with csup

I want to thank one of the readers who left a comment recently regarding the use of cvsup.  Apparently, some time ago, cvsup was replaced with a smaller, faster utility which comes included in the base OS.  This tool is simply: csup.

Some of the benefits of using csup instead of cvsup are:

  1. It comes preinstalled in the base OS.
  2. No need to build cvsup and all its dependencies.
  3. No need to install base ports in order to build cvsup in order to update your ports.

I tried csup and noticed that it should be a drop-in replacement for those that still use cvsup.  You should be able to use the same options and command arguments that you did previously.

Here is an example of something I’ve setup which allows me to update my base OS + ports using csup and one command:

/etc/make.conf

## csup config (just use 'make update' in /usr/ports or /usr/src)
SUP_UPDATE=yes
SUP= /usr/bin/csup
SUPFLAGS= -g -L2
SUPHOST= cvsup.freebsd.org
SUPFILE= /usr/share/examples/cvsup/standard-supfile
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile

After adding those lines to your /etc/make.conf you can update your base OS and ports tree using ‘make update’ within the /usr/src directory.

For more info on using either of these tools see the CVSup Handbook page.

Tags: , ,