pavement

Updating the system

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
Line 23: Line 23:
 
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:
 
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:
 
#Do a binary Upgrade to a release version
 
#Do a binary Upgrade to a release version
#Do a binary Upgrade using the method described [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]
+
#Do a binary Upgrade using the method described  
 +
FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]
 +
 
 
#Do a source upgrade as described [[upgrading the base system | here]]
 
#Do a source upgrade as described [[upgrading the base system | here]]
  
Line 44: Line 46:
 
* uses http only
 
* uses http only
 
* easy to use
 
* easy to use
 +
 +
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==
 +
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html
 +
 +
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP. 
 +
 +
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: http://www.bsdforums.org/forums/showthread.php?p=290929#post290929
 +
  
 
[[Category:Common Tasks]]
 
[[Category:Common Tasks]]

Revision as of 23:20, 10 March 2008

Note: If you only want to install security updates, it's enough to subscribe to FreeBSD security notifications and follow the instructions in each advisory. Otherwise, read on.

In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.

Contents

Basic Security updates

From FreeBSD 6.X you can simply keep up to date using freebsd-update

First time use:

# freebsd-update fetch
# freebsd-update install

You can rollback in-case of problems

# freebsd-update rollback

Use the following line in your /etc/crontab to keep your machine up to date: 30 3 * * * root /usr/sbin/freebsd-update cron -t <email address>

This will email you when updates are available and to install them type

# freebsd-update install

Updating the base system

To upgrade to a RELEASE version of FreeBSD, you can do one of three things:

  1. Do a binary Upgrade to a release version
  2. Do a binary Upgrade using the method described

FreeBSD 5.4 to 6.0 here

  1. Do a source upgrade as described here

A binary upgrade to a release version can be done by running sysinstall from the installation medium (e.g. CDROM). See the release notes of the release for details. Note that this will wipe out a lot of customizations.

Updating applications

Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.

First update the ports tree (/usr/ports/). This can be done via cvsup, ctm or portsnap. The ports can then be automatically updated using portupgrade or portmanager, which are capable of dealing with dependencies.

How do I download updates?

The most common method used is cvsup (see updating the ports tree). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use ctm to obtain differential updates by email or ftp.

For updating the ports tree, a third option is available. Portsnap is an automated tool which offers many advantages over both the other methods:

  • secure (uses cryptographic signing)
  • very efficient in terms of bandwidth consumption and server load
  • uses http only
  • easy to use

FreeBSD Binary Upgrade 6.3 to 7.0 Notes

It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html

Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.

I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command. You get a failure with ruby. Please refer to my post at for the solution: http://www.bsdforums.org/forums/showthread.php?p=290929#post290929

Personal tools