Monday, 12 May 2014

Apache and Upgrading Ubuntu Server LTS

Now that Ubuntu 14.04 LTS is available it's time to think about upgrading all those 12.04 servers.  For me that meant updating my home file server and development server, not exactly mission critical, so I plowed straight in to see what would get broken.

Largely the update went without fault, but before anything make sure you backup any important files.  To get it started I changed the /etc/update-manager/release-upgrades file from :-

Prompt: LTS

to :-
Prompt: normal
This step might not be necessary by now, but can be used safely if you know you are going from one LTS to another.  Once you get the the final LTS version you can set it back to Prompt: LTS

Next, update the list of available packages and install any updates.
sudo apt-get update
sudo apt-get dist-upgrade 
It's probably wise to reboot the machine at this point and check that all is well before continuing.  Once you're happy to continue start the release update.
sudo do-release-upgrade
Follow the prompts and carefully consider any prompts about replacing configs files, you can always say no, then fix the config by comparing your config with config.dpkg files.  I usually keep a list of all the files that had problems during the upgrade.

Once the upgrade completes you ought to reboot.  Repeat the do-release-upgrade process until you are at the 14.04 LTS version.

 Notable changes

- Apache Web Server, now at version 2.4.

There are some changes to the allowed config files for Apache, for me this manifested itself in a virtual host that no longer was available.  Where previously any file in /etc/apache2/sites-enabled would be parsed, it now only looks for and parses files with .conf extensions.  In addition the options to control access by ip have changes.  Instead of Order Allow, Deny and Allow from xxx.xxx.xxx.xxx/yy you need to use the Require syntax.

- PostgreSQL, from 9.1 to 9.3

As with any update to PostgreSQL you will need to run pg_upgradecluster after dropping the new default cluster with pg_dropcluster --stop 9.3 main; pg_upgradecluster 9.1 main
If you have any databases that use the postgis extension then I suggest making a backup first, dropping the database from 9.1, upgrading the cluster then restoring it to 9.3 after ensuring that postgis is installed and available.

Edit: Further investigation on my postgres migration showed that many tables were missing data.  Double check that upgradecluster completed successfully.  If in any doubt you probably should just do a full pg_backup and pg_restore.

No comments:

Post a Comment