Debian 8(Jessie) to 9(Stretch)
It's important to keep a Debian system updated if security updates is a priority.
From the official Debian FAQ regarding lifespan:
Q: How long will security updates be provided?
A: The security team tries to support a stable distribution for about ONE YEAR after the next stable distribution has been released, except when another stable distribution is released within this year. It is not possible to support three distributions; supporting two simultaneously is already difficult enough.
MySQL Admins BEWARE! MySQL gets replaced by MariaDB by default in Debian 9 "Stretch"! In a very rapey way! It's a one-way street as far as database format conversion goes (at the time of writing this document at least). The upgrade will do an automatic drop-in replacement unless you use the MySQL repository instead of the Debian one. I was using MySQL 5.5 from Debian/oldstable. I wanted the latest MySQL 5.7 and did this before upgrading:
Put into /etc/apt/sources.list: deb http://repo.mysql.com/apt/debian/ jessie mysql-5.6 Download and insert their key before updating and upgrading: # apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 (try twice if error) # apt-get update; apt-get dist-upgrade Update sources.list to next MySQL version: 5.7 and upgrade again. # apt-get update; apt-get dist-upgrade I continued with system upgrade after this. I had some issues with PHP and phpMyAdmin afterwards but I fixed all that by reinstalling them with minor configuration updates after the system upgrade. Remember to a2enmod PHP again and systemctl restart apache2 afterwards. 5.5 to 5.7 changes that have given me issues so far: - I ran into issues with some of my SQL GROUP BY queries: SELECTing columns that are not directly dependant on the column used in GROUP BY is no longer allowed by default, you must mention it in the GROUP BY clause or change the expression to GROUPing another column that's e.g. a primary key or not SELECTing the nonaggregated/nondependant column in the first place. - mysql_dump cron backups gave me the error: Table 'performance_schema.session_variables' doesn't exist (1146) Fix: # mysql_upgrade -u root -p --force
'ifconfig' and 'route' is deprecated in 9 "Stretch"
Replaced with the iproute2 tools, example use: # ip a (similar to 'ifconfig') # ip route show My previous notes on custom routing
Steps below to upgrade to Debian 9.
Make sure Jessie is updated first:
# apt update # apt upgrade
Change package repository from jessie to stretch in /etc/apt/sources.list (and others as needed):
sed -i 's/jessie/stretch/g' /etc/apt/sources.list
Go get Stretch
# apt update # apt upgrade # apt dist-upgrade
A reboot is in order to complete the process.
If you survived that, you can now do:
root@Thronic ~ # hostnamectl Static hostname: Thronic Icon name: computer-vm Chassis: vm Machine ID: 0abafd262f89a94fa753b25ce83db1de Boot ID: 76752c8ea6b744ed8600a6908b466acf Virtualization: kvm Operating System: Debian GNU/Linux 9 (stretch) Kernel: Linux 4.9.0-3-amd64 Architecture: x86-64
- Checking if a certain package is installed:
# apt list --installed <searchword>*
- Checking for available packages:
# apt list <searchword>
# apt-cache dump | grep <searchword>
There's an increased motivation to use apt instead of apt-get on Debian 9 as it's referenced a lot more in wiki articles. It's a pretty nice tool that works well at a higher level, simplifying and automating what you would do with lower level apt tool commands such as apt-get, apt-cache, dpkg-query, etc. It also comes with a very nice progress bar!