Debian Squeeze (6) ends support – time to upgrade


openlogo-nd-100February 29th, 2016 marks the end of LTS Support for Debian Squeeze, which is still used by many of our customers.  This means that updates for known security issues will no longer be produced and over time, a server running this version will become vulnerable to being exploited.

Squeeze was released in 2011 and was our recommended distribution at the time, however if you’re still running it now is the time to upgrade to a new version.  Wheezy (Debian 7), and Jessie (Debian 8) have been released since then.  Debian is known for having a relatively easy in-place upgrade system, compared to other distributions.  However, there are still potential problems with any upgrade, so be prepared to fix up configuration problems that might prevent your server from operating properly after the upgrade.

There are a couple of factors that would make upgrading more of an involved process.  If you have a control panel such as Plesk or Cpanel, the upgrade will be different and this guide doesn’t cover that.

If you have web applications installed, they might be dependant on a particular version of php, and the upgrade may change the php version and break your web application.  For popular web applications and frameworks such as WordPress and Drupal, this should not be a problem if the application/framework itself is up to date.  Check the requirements of your application and make sure it is updated before you update Debian.

You can find more details about Debian upgrades at our dist upgrade page. You can also find a handy script which automates the upgrade at https://github.com/pbkwee/distrorejuve.  (Run that with –to-jessie to get from Squeeze to Jessie)

Upgrade to Wheezy

You probably want to end up on Debian Jessie, the current stable version, but you can’t upgrade directly from Squeeze to Jessie in a manual upgrade, first you need to upgrade to Wheezy then complete the upgrade to Jessie as detailed in the next section.

Debian’s official guide to upgrading to Wheezy is at https://www.debian.org/releases/wheezy/amd64/release-notes/ch-upgrading.html.  That includes handling advanced details such as apt pinning and package holds, which probably aren’t relevant if you’ve got a standard install.

If you want to upgrade manually, the main steps for a Wheezy upgrade are:

  • Take a backup.  Go to https://rimuhosting.com/cp/vps/backup.jsp and click “Run Backup”  You should also consider backing up data separately, e.g. taking a database dump.
  • Log on to your VPS via ssh
  • To make sure you have enough disk space, run df -h.  You should be fine if there is 1G or more available on your main partition.
  • Before you upgrade, make sure squeeze is up to date: apt-get update; apt-get dist-upgrade; apt-get clean
  • make sure there are no problems with the packaging system: dpkg --audit.  This command won’t produce any output if everything is OK.
  • Comment out any backports or unofficial sources in /etc/apt/sources.list and /etc/apt/sources.list.d/*
  • Change /etc/apt.sources.list to point to Wheezy, eg.
    deb http://http.us.debian.org/debian wheezy main
    deb http://security.debian.org/ wheezy/updates main

    and update the package list: apt-get update

  • Now it’s time to run the update.  This might take up to an hour or more, depending on the state of your system: apt-get dist-upgrade
  • While the update proceeds, periodically check the output, as it will occasionally stop to ask questions like “A new version of configuration file xxx is available, but the version installed currently has been locally modified. What do you want to do about modified configuration file xxx?”  Answering “install the package maintainer's version” will result in keeping the system as standard as possible, but it may remove customisations needed to keep your server operating as intended.  Answering “keep the local version currently installed” will keep your customisations, but your configuration may not work on the updated system.  Make a note of any files you’re unsure of to check later.
  • run apt-get clean to delete package files that were downloaded during the upgrade.
  • (optional – recommended) Go to https://rimuhosting.com/cp/vps/kernel.jsp and select the latest 4.1 series kernel (currently 4.1.17-rh17.xenU.x86_64), which will work fine for Wheezy.
  • If you didn’t already do so in the step above, reboot the system.
  • Check the system is functioning as expected.  Update any configuration files that need updating.

The most common problem upgrading from Squeeze to Wheezy is changes in the Dovecot configuration (i.e. email access).  You should “install the package maintainer's version” for Dovecot related files, re-apply any customisations to that, and you may need to move certificate files as well, and double check that the configuration points to the correct certificate files.

Upgrading to Jessie

Jessie is the latest version of Debian, and our current recommended distro.  These instructions describe the second part of the manual upgrade from Wheezy to Jessie.

This part of the upgrade is similar to the upgrade from Squeeze to Wheezy.  If you are following straight on from the first part, you probably would not take another VPS backup, although you might want to make a copy of configuration files you have changed during that upgrade.   Note Jessie uses systemd which requires features which aren’t in old kernels, so make sure the kernel is updated first (see above.)

The apt sources list lines to use are:

deb http://http.us.debian.org/debian/ jessie main
deb http://security.debian.org/ jessie/updates main

See our dist upgrade page for more details.   In Jessie, Apache has changed from version 2.2 to version 2.4, and this comes with some significant changes in configuration file syntax.  Again, it’s likely best to “install the package maintainer's version” for Apache related files, and fix up the configuration to re-add your customisations.

Despite being more work, it’s preferable to do the complete upgrade to Jessie rather than just upgrading to Wheezy.  Jessie software is more current, and it should receive LTS support until 2020, while Wheezy support will end in 2018.

If you would like assistance upgrading servers, RimuHosting can help.  Just put in a sysadmin work ticket at https://rimuhosting.com/ticket/startticket.jsp.  A straightforward squeeze-wheezy-jessie upgrade will take our experienced sysadmins less than 2 hours, as long as there aren’t dependencies on outdated software.

, ,