Upgrading my VPS to Debian Etch

By | October 12, 2008

You might have noticed it yesterday, or not ;). But my blog and several other websites hosted by me went offline yesterday for a couple of hours. Well this had to do with me upgrading the VPS to Debian Etch.

So far I ran every website on Debian Sarge, and though it’s stable they choose to no longer developer for it nor support it. So it was time to move to a newer version. Wich I did yesterday. Here’s some of the steps you should take before upgrading to the next version of Debian.

  • Make a full backup of any website’s / databases / scripts running (don’t forget your crontab and logrotate files)
  • Copy the backup to a directory not affected by the upgrade. In my VPS the provider has one folder which will be left untouched, but also pull the backup to a local system (just in case ;))
  • Notify any other users also using your server, don’t want any suprises to potential paying customers.

I was lucky that my hosting provider offers an easy way to upgrade or reinstall a Linux distro on the VPS. Just a couple of mouse clicks and they prepare the VPS for the installation. Please note that this will take up to an hour to complete. Once this base installation is complete you will want to perform the following steps:

  1. Un rar the backup of the websites / conf files and scripts (tar xf <tar name>) and move them to the right location.
  2. Setup the proper user account /groups to have access to these files (or your users won’t be able to upload or change the website’s any more)
  3. Install apache / PHP and mysql by running the following command:
      apt-get install php5 mysql5-server apache2 mysqllib
  4. Setup the apache conf file to load in your restored conf files (eg: Include /export/conf/apache/*.conf)
  5. Replace the mysql my.cnf with the one you backed up previously
  6. Enable the rewrite and ssl modules of apache (I forgot and got some upset calls :()

From this point on your ready to go. All of the websites should be running without any problems. You do need to configure any other tools you had installed, like AWStats / Subversion or anything else. Though these should not require to much configuration as all of the configuration files where included in your backup. At least if you followed a setup similar to my first article on setting up linux.

Leave a Reply