TechnologyCMS

How to update Debian Jessie 8 to 9 Stretch?

Debian

17 June 2017 released another update of the popular Linux distribution Debian. This is the 9th release of Debian is codenamed, Jessie. I explain in detail how to upgrade from a previous release, Debian 8 Jessie, Debian 9 to Stretch. The upgrade process is not complicated, is performed by means of the standard by apt.

Introduction

Detailed information about the new version of Debian, you can learn from official news. The most significant changes can be noted:

  • Pack changes MySQL to MariaDB. Previously this was done on centOS. Now Debian has decided to use the default MariaDB.
  • The installer by default now uses the graphical mode.
  • The system includes tools for the management of nftables, a new firewall, which aims to replace iptables.
  • There is a new repository dbg-sym packets for debugging.
  • In the new distribution system implemented in a predictable naming for network interfaces. Instead of eth0, eth1, etc., the information is used depending on the capabilities of the BIOS – enoN, ensN, enpNsM. If the parameters of the new markup interfaces are unavailable will use the old one. In General, this should prevent the situation where after adding a new network interface, change the names in the system of existing adapters.

Updating the system to fulfill not difficult to cope virtually any user using this guide. Problems may arise in individual packages and dependencies. But here is the finished do not give advice, you need to understand the place. In my experience, most often, everything goes fine, can be updated by following the appropriate training.

Preparing the server for upgrade

Will update the following system:

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.7 (jessie)
Release: 8.7
Codename: jessie

For that, we’ll spend upgrading to the 9th version of the Stretch.

The first thing to do before any upgrade you need to back up all the important information and configuration files. In each case it will be your dataset, so you decide what data are important, and copy them somewhere.

I recommend to make a backup of the folders: /etc, /var/lib/dpkg, /var/lib/apt/extended_states. Save the command output:

# dpkg --get-selections "*"

These steps will allow you to save the list of installed packages and settings to them. If you work on a virtual machine, make a backup or snapshot before upgrading.

Now update the current Jessie system:

# apt update
# apt upgrade
# apt dist-upgrade

Model repository in the file /etc/apt/sources.list. I prefer to use the repository Yandex “http://mirror.yandex.ru” Comment or delete all the contents of the file and add the following lines:

deb http://mirror.yandex.ru/debian stretch main
deb-src http://mirror.yandex.ru/debian stretch main

deb http://mirror.yandex.ru/debian Jessie-updates main
deb-src http://mirror.yandex.ru/debian Jessie-updates main

deb http://security.debian.org/ Jessie/updates main
deb-src http://security.debian.org/ Jessie/updates main

The updated list of available packages for the new release:

# apt update

Update the list of available packages

The Debian upgrade from 8 to 9

The system update will do in 2 stages. First a minimal upgrade, then the full. Do a minimal upgrade:

# apt upgrade

This will update only those packages which can be updated without the need to remove or install other packages. Before starting the installation you will be presented with a list of changes for the new release. It can scroll down, or press to close the information and continue with the installation.

During the upgrade, it will ask you for permission to restart some services. Need to give permission.

permission to restart some services

After the minimal upgrade Debian, run full:

# apt dist-upgrade

This will perform a full system update, installing the newest available versions of all packages, and resolve all changes between releases Jessie and a Stretch dependence. If necessary, will install some new packages, and remove any conflicting obsoleted packages.

If you have installed a MySQL database, it will automatically be replaced by MariaDB.

While updating packages, you can be asked questions about configuration files. It depends on the particular set of software. I recommend keeping the old configs. If there are any problems, then in manual mode to fix them. I think it’s easier than porting the configuration from the old file to the new one.

After the completion of the command apt dist-upgrade, the upgrade is completed. You can reload:

# reboot

Check the version:

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch

Update Jessie was successful. Have the latest version of Debian 9.0 Stretch.

Shares:
Show Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

eight − 4 =