How to upgrade Debian Wheezy to Debian Jessie
Before we begin, it’s important to take a backup of all the necessary data. The most crucial part of your backup includes directories like
/home. And if you’ve database(s) then you should take their backup as well and they should be stored on an external hard disk, such as disk space on a remote server. To accomplish this goal and all other procedures for the upgrade from wheezy, we will follow the steps below:
- Taking a backup of configuration and data
- Inspect the apt sources.list file
- Update Debian Wheezy packages
- Check the package state to ensure that no packages are on hold or in half installed state
- Update Debian Wheezy sources.list for Jessie
- Just two steps for upgrading your Wheezy to Jessie
- Check the update
- Link to download Debian Jessie (and other versions)
Taking backup of configuration and data
take backup of /etc
tar -pczf etc.tar.gz /etc
Take backup of the /var/www website directory
Note: your server may have it’s web files located on different directory depending on your web application (i.e. apache configuration)
tar -pczf www.tar.gz /var/www
Take backup of the /home directory
tar -pczf home.tar.gz /home
Take backup of the /var/log directory
tar -pczf logs.tar.gz /var/log
Inspect the apt sources.list file
Before upgrading to Jessie, we’ll install any available updates for the currently installed version of Wheezy. On some installation the package source is defined as “stable” instead of “wheezy” in the sources.list file. This can accidentally upgrade your current distro to an early Jessie version. To avoid this, please ensure that sources.list doesn’t have “stable” written over there.
We’ll use nano file editor to open and edit the /etc/apt/sources.list file.
Once opened look for the lines below:
deb http://ftp.debian.org/debian wheezy main contrib deb http://ftp.debian.org/debian wheezy-updates main contrib deb http://security.debian.org wheezy/updates main contrib
Update Debian Wheezy packages
These following commands should install any pending updates for your Wheezy version. This will make sure that your system is in a great shape for the update to Jessie.
Check the package state to ensure that no packages are on hold or in half installed state
We will now check the state of installed packages to make sure neither of them are on-hold or half installed state. Your system and apt-database should be in a great shape before we could proceed with the distribution upgrade. If there are any broken or on-hold packages found, we must fix those issues before we could upgrade.
dpkg --get-selections | grep hold
Only when both of the above command return no result we should proceed with the upgrade.
Update Debian Wheezy sources.list for Jessie
We will edit the /etc/apt/sources.list file once again:
and then replace the content inside the file with the following lines:
deb http://ftp.debian.org/debian jessie main contrib deb http://ftp.debian.org/debian jessie-updates main contrib deb http://security.debian.org jessie/updates main contrib
After updating the content run the following command to being updating
Just two steps for upgrading your Wheezy to Jessie
We will upgrade to Jessie by simply using two commands only. first one will be “apt-get upgrade” which will install the base packages and the second one will be “apt-get dist-upgrade” to upgrade the distribution itself.
Once the upgrade is completed, we’re required to reboot our system so that the new kernel is loaded on next boot:
Check the update
To confirm that we’ve upgraded we should run the following command:
If we’ve successfully upgraded the result should be:
Link to download Debian Jessie (and other versions)
Download Debian from: http://www.debian.org/
Feel free to contact us if you believe you’re still facing issues following these steps. Rackhansa Professionals are always ready to help their customers in making their online presence smooth and uninterrupted. Our free webhosting services have also been devised mainly for those entrepreneurs who have just jumped into online business. To know more about our services, please visit our products page to enjoy the cheap hosting plans.