Updating FreeBSD – The modern way!

The time has finally come for me to update my update method. For years I have been a ‘dyed-in-the-wool’ cvsup guy, but the last server I installed (FreeBSD 9.1) started bleating about the ports tree not being updated any more, and to be honest I should have taken more notice of my emails! The full story can be found ***here***

So whats the ‘new way’?

FreeBSD has a great utility called freebsd-update which will take care of security fixes as well as minor and major upgrades to the kernel. The freebsd-update does not need to be installed or, even configured unless you have specific requirements. You can control behaviour with the configuration file located in /etc/freebsd-update.conf. So lets just do the first update from the command line:

# freebsd-update fetch
# freebsd-update install

I want to automate this with cron so first I added my email address to the config file. The I added the special 'cron' feature as such:

@daily                                  root    freebsd-update cron

that takes care of the kernel…

What about the Ports?

Portsnap takes care of the ports collection without much effort at all. As always there is has a configuration file, but unless you have some specific issues it can probably left alone. For reference it lives here: /etc/portsnap.conf. To run the program for the first time:

# portsnap fetch
# portsnap extract

thereafter

# portsnap fetch update

Thats pretty much it, you can cron the job if you wish, however I tend to do it on demand.

This entry was posted in FreeBSD Administration and tagged , , . Bookmark the permalink.

Leave a Reply