How to Upgrade Debian 7 Wheezy to Debian 8 Jessie

Debian 8.0 „Jessie” został wydany 25 kwietnia 2015 roku. po długim oczekiwaniu trwającym 2 lata w końcu zespół Debiana ogłosił swoje nowe wydanie 8 o nazwie kodowej „Jessie”.

Jeśli jesteś użytkownikiem Debiana 7, ten artykuł pomoże Ci w aktualizacji systemu do Debiana 8 za pomocą prostych kroków. W tym poleceniu wszystkie polecenia są uruchamiane z konta roota. Tak więc przed rozpoczęciem pracy zaloguj się do systemu jako konto root lub użyj sudo dla wszystkich poleceń.

1. Backup Your Data

The first and very important thing is data. So we strongly recommend you to take backup any data which is important for you’re in existing system.

  • Application codebases
  • Databases
  • Configuration files (eg: DNS, Apache, MySQL, PHP, Postgres etc)
  • Emails and email accounts.
  • User accounts details.

For more details read Chapter 4. Upgrades from Debian 7 (wheezy) recommendation by Debian before upgrading to Debian 8.0.

2. Upgrade All Packages of Debian 7

Before upgrading to Debian 8.0 first update all packages of current installed Debian system using following command.

root@debian:~:# apt-get update && apt-get upgrade

3. Update sources.list Repository File

Now edit Debian apt repository file /etc/apt/sources.list and replace all “wheezy” with “jessie” to get Debian 8 packages. Replace all instances at once use sed command like below:

root@debian:~# cp /etc/apt/sources.list /etc/apt/sources.list.orig
root@debian:~# sed -i 's/wheezy/jessie/g' /etc/apt/sources.list

Old /etc/apt/sources.list File:

deb http://deb.debian.org/debian wheezy main
deb-src http://deb.debian.org/debian wheezy main

deb http://deb.debian.org/debian-security/ wheezy-security main
deb-src http://deb.debian.org/debian-security/ wheezy-security main

deb http://deb.debian.org/debian wheezy-updates main
deb-src http://deb.debian.org/debian wheezy-updates main

After changes new /etc/apt/sources.list File:

deb http://deb.debian.org/debian jessie main
deb-src http://deb.debian.org/debian jessie main

deb http://deb.debian.org/debian-security/ jessie-security main
deb-src http://deb.debian.org/debian-security/ jessie-security main

deb http://deb.debian.org/debian jessie-updates main
deb-src http://deb.debian.org/debian jessie-updates main

4. Update all Packages Again

After replaces all references of repository source file, first update all packages before upgrading distribution.

root@debian:~:# apt-get update && apt-get upgrade

5. Upgrade to Debian 8 Jessie

Finally upgrade your current Debian 7 distribution to Debian 8 Jessie using following command.

root@debian:~:# apt-get dist-upgrade

6. Verify Upgrade

At this point your system will have upgraded successfully to Debian 8. Lets reboot the instance first and check the version of upgraded system.

root@debian:~:# reboot

Verify current version of Debian.

root@debian:~:# lsb_release -a

Distributor ID: Debian
Description:    Debian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie

Congratulation’s You have successfully upgraded to Debian 8 “Jessie”. Have fun!

Źródło: Link