Monday, September 18, 2017

Debian jessie: upgrade to Debian 9 (codename stretch)

Note:
  1. Debian 9 Stretch does not include MySql, your MySql will replace with MariaDB 10.1. Follow this step  to keep your MySql.
  2. PHP 7.0 will be use. Your PHP application may be not support it.
Upgrade your system and application before performing Debian 9 upgrade.
# apt-get update && apt-get upgrade -y
Note: restart your system if needed.

Install apt-listchanges
# apt-get install apt-listchanges

Edit your apt source and add Debian 9 (stretch) repository:
#deb http://security.debian.org/ jessie/updates main
#deb-src http://security.debian.org/ jessie/updates main

# Indonesia (main)
#deb http://kambing.ui.ac.id/debian/ jessie main
deb http://kambing.ui.ac.id/debian/ stretch main contrib

# NON FREE
#deb http://httpredir.debian.org/debian jessie main contrib non-free

# BACKPORT
#deb http://ftp.de.debian.org/debian jessie-backports main

# Google chrome
#deb http://dl.google.com/linux/chrome/deb/ stable main
Note: You can choose other closest mirror to you or use "deb http://mirrors.kernel.org/debian stretch main contrib".

To add CD-ROM
# apt-cdrom add

Do minimal upgrade by running apt update and apt-get upgrade
# apt-get update
...
# apt-get upgrade
...

You are ready for distribution upgrade. Edit /etc/apt/sources.list
#deb http://security.debian.org/ jessie/updates main
#deb-src http://security.debian.org/ jessie/updates main
deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main

#optional
#deb  http://deb.debian.org/debian stretch-updates main

# Indonesia (main)
# deb http://mirrors.kernel.org/debian stretch main contrib
deb http://kambing.ui.ac.id/debian/ stretch main contrib

# NON FREE
deb http://httpredir.debian.org/debian stretch main contrib non-free

# BACKPORT
deb http://ftp.de.debian.org/debian stretch-backports main

Note: you need to enable NON FREE repository for firmware upgrade

Do distribution upgrade
# apt-get update && apt-get dist-upgrade

Distribution upgrade will take some times depend on your connection speed. At the end of packages upgrade, you will need to interact with system.
Restart your system and enable 3rd party repository such as google chrome, virtualmin, odoo, etc. Perform final upgrade/update.
# apt-get update && apt-get upgrade -y

Your Debian 9 (stretch) is ready. :)
# uname -an
Linux saturn 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

Note:
  1. A new configuration may apply, please carefully to choose a new configuration or your existing one (the option show as keep local).
  2. Default document root apache2 folder will change from /var/www/ to /var/www/html.
  3. Apache2 will run under linux user and group 'www-data'.
  4. To replace php5 to php7.0 follow this step

References: 

No comments:

Post a Comment