Content
- page: Completing pre-update tasks
- page: Upgrade Debian 10 (Buster) to Debian 11 (Bullseye).
- page: Checking the server after the update and making subsequent settings
The 1. page content
Introductory
Another era has come again, when our Debian 10 (Buster) server has also run out of time, and it has become a burning task to do something about this problem.
During the life of a web server, a lot of software is installed and configured, which takes a lot of time. Reinstalling and configuring the server from scratch, as well as restarting the web pages on it, can cause a lot of downtime, because by the time everything is in place, our web pages will not be available to our visitors. On the one hand, this is not beneficial from a business point of view, because during this time we can also lose customers, and a more permanent outage can also cause a temporary deterioration in the position of our websites in the search engines.
Fortunately, there is no problem, because most Linux distributions - like Debian - have the ability to update the entire distribution on the fly; so, for example, Deban 10 (Buster) can be upgraded to Debian 11 (Bullseye). Thanks to this, we can get away with the whole thing with a single reboot - as opposed to a lengthy installation and configuration.
I have previously made tutorials on this topic, which can be viewed at the following links:
- How to upgrade your home computer from Debian 8 (Jessie) to Debian 9 (Stretch)
- How to upgrade your perfect Debian9 (Stretch) based server to Debian 10 (Buster)
Before starting anything, it is advisable to review these as well, because they contain a lot of useful information.
Prerequisites
I prepared this distribution update description for a perfect server based on ISPConfig, so I will do it with the following configuration:
Starting server and the modifications and additions made to it:
- Perfect server: Debian 10 (Buster) V1.0
- Download the perfect server: Debian 10 (Buster) v1.1 (a separate comprehensive description was not prepared for this, but the installations that have since been added to it have been listed here)
- Server monitoring with Monit on Debian and Ubuntu systems (here the first scenario was implemented on this server)
The screenshots presented during the description and copied terminal outputs are produced by this configuration, so in the case of other configurations, we may get somewhat different outputs.
The configuration used here apparently contains quite a lot of add-ons and services, which makes the server very suitable for presenting a distribution update.
The guide presented here is one of my own VirtualBox on a virtual machine I perform.
What's new and changes in the Debian 11 (Bullseye) operating system
I would not exaggerate this part too much, because the Debian 11 (Bullseye) release was already published in August 2021, so the new features in it are probably already known to many, but we can review them again at the link below:
Before the update, it does not hurt to run through them - especially the Debian upgrade part - to make sure that all circumstances are suitable for us to upgrade.
Things to do before upgrading
Before we can start the upgrade, there are a few things we need to do to check if our system is up to date with the distribution, and to make sure the upgrade goes smoothly.
Hereinafter rootperform the tasks as
System overview
First, it is advisable to review our entire system and collect those functions and services that may be pivotal in terms of the update, and for the sake of comparison, it also does not hurt to take a last look at our things before the update, so that we can then check that everything really works flawlessly on our server.
Query version and release information
First, read about the kernel and Debian version and the distribution release. These can be viewed with the following commands:
uname -a
lsb_release -a
hostnamectl
cat /etc/os-release
cat /etc/debian_version
Linux debian10 4.19.0-23-amd64 #1 SMP Debian 4.19.269-1 (2022-12-20) x86_64 GNU/Linux [...] No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster [...] Static hostname: debian10 Icon name: computer-vm Chassis: vm Machine ID: c898b9a88b1d44d3864e6dafb76e2e10 Boot ID: 2aadf456700f487cb7b9c989bcbcbbd8 Virtualization: oracle Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-23-amd64 Architecture: x86-64 [...] PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" [...] 10.13
Overview of websites and web applications
Here, we now review the web pages and web applications on the server.
Drupal 9 website
Since it is a web server, there must be one or more websites on it. We look at these to see if everything is in order. I have Drupal 9 on this server CMS basic installation, which does not contain anything special, I only made it for a previous installation description, so now I am checking this:
There are a few caveats here, but they are irrelevant here. What will change here is, for example, the version of the database engine: it will be 10 in Debian 10.3.36 and 11 in Debian 10.5.18.
ISPConfig
ISPConfig web hosting control panel:
All right here. It indicates that some packages need to be updated, but this is not a problem.
phpMyAdmin
Here, too, we can see the system parameters at the top right, as well as the version of phpMyAdmin at the bottom right, where it also indicates that it is outdated. This copy at the time manually installed from its source code, so it is not updated. But at the end of this description, we will also solve the automatic update of this. Of course, if our own copy is already in the Debian 10 backports into storage we installed it from a package included later, then this is it APT it will be updated with the other packages using a package manager.
Roundcube Webmail
Roundcube Webmail:
There is also an email address on this server, with which I can log in:
Munin
Munin server resource monitor program:
I have used the machine here a few times in the past, so there are remnants of the graph...
Monit
Monit server service and resource monitor program
That's all there was to review on this server, of course everyone can check their own things according to their own config even before the update for the last time.
Backup
It is strongly recommended to make a backup of our important things and settings. I would not go into detail about this here again, because it was already discussed in previous tutorials, so we have already covered this in more detail on the links below:
- How to upgrade your home machine from Debian 8 (Jessie) to Debian 9 (Stretch) - Backup
- How to upgrade our perfect server based on Debian9 (Stretch) to Debian 10 (Buster) - Backup
This part is therefore independent of everything, so we can apply it from previous parts as well.
Checking packages and packages
The last major step before distributing a distribution is a luggage racks and checking, sorting, and updating packages.
Updating packages
First, update your storage database and packages as usual rootas apt-get command:
apt-get update
apt-get upgrade
I didn't have anything to update here, because I've already updated this machine several times in the past few days.
Search and update held packages
In the next step, we look for the withheld packages that the package manager does not update for some reason. If the recent upgrade command stated that certain packages will be withheld, you can find detailed instructions at the following links:
- How to update our hold packages using the APT package manager
- How to upgrade your home machine from Debian 8 (Jessie) to Debian 9 (Stretch) - Find broken or held packages
- How to upgrade our perfect server based on Debian9 (Stretch) to Debian 10 (Buster) - Search for held packages
Find and remove broken packages
There may also be broken packages in the system, which are half or partially configured packages. Look for these as well and remove them if they can no longer be repaired:
dpkg --audit
If you find faulty packages, dpkg will suggest what to do with them to fix them.
Related details from previous tutorials:
- How to upgrade your home machine from Debian 8 (Jessie) to Debian 9 (Stretch) - Find broken or held packages
- How to upgrade our Debian9 (Stretch) perfect server to Debian 10 (Buster) - Find broken packages
He didn't find any such package with me, so I'll move on.
Search for outdated packages and possibly remove them
Obsolete packages are either no longer in the package, have been considered obsolete, or have not been installed from standard Debian repositories, such as compiled from source, and so on. We also need to review these to see if we have such packages, and if so, whether they could be a barrier to a successful distribution upgrade.
Search for obsolete packages in aptitude Or the apt-show-versions commands. All must be installed before use, none of which are installed on Debian systems by default:
apt-get install aptitude
apt-get install apt-show-versions
If they are already installed, you can use the following commands to find your obsolete packages (the first two commands are equivalent):
aptitude search '~o'
aptitude search ?obsolete
apt-show-versions | grep 'No available version'
He didn't find anything here for me:
I have already explained this in more detail in previous update tutorials, so let's review these parts as well:
- How to upgrade your home machine from Debian 8 (Jessie) to Debian 9 (Stretch) - Find and remove outdated packages
- How to upgrade our perfect server based on Debian9 (Stretch) to Debian 10 (Buster) - Search for outdated packages
There are as many configurations as there are situations, so it is worth reviewing them.
Search for third-party packages
Then look for third-party packages. Updating these packages in newer Debian major releases is uncertain, so they may cause problems. So we check the packages that were not installed from the official Debian repositories. Here there may be overlaps with outdated packages, for example, in the case of packages installed from a source, for which there is no update, it is also marked as outdated, and since it was not installed from the official package repository, it is also considered third-party. We can list these packages using the previously used aptitude command:
aptitude search '~i(!~ODebian)'
I have the output of this command:
Here I only have the sury.orgThere are packages from , which are guaranteed to be updated in Debian 11, so there is nothing to do with them. However, if other packages appear in this list that we don't know if they will receive updates in the future, then we need to consider what to do with those packages. If they don't get updates to the next major version, you might want to consider replacing them with alternative software, etc.
Search for redundant packages
Even remove automatically installed package dependencies that are no longer needed by any other package:
apt autoremove
I didn't have anything here now, because as I already mentioned, I already performed maintenance on this server in the past few days. But there is a good chance that they may occur elsewhere.
Empty the package cache
Before emptying the packet cache, you can see its size a du You can see the free space by looking at the command and then viewing it again after cleaning. To do this, run the following commands:
du -sh /var/cache/apt/archives
apt-get clean
du -sh /var/cache/apt/archives
Roughly 420 Mb of space has now been freed up for me:
A next page we proceed with the upgrade of the distribution to Debian 11 (Bullseye).
- How to upgrade your home computer from Debian 8 (Jessie) to Debian 9 (Stretch)
- How to upgrade your perfect Debian9 (Stretch) based server to Debian 10 (Buster)
- Perfect server: Debian 10 (Buster) V1.0
- Download the perfect server: Debian 10 (Buster) v1.1
- Server monitoring with Monit on Debian and Ubuntu systems
- Encyclopedia - APT (Advanced Packaging Tool)
- Encyclopedia - Trunks
- Encyclopedia - Debian Backports
- Encyclopedia - ISPConfig
- Encyclopedia - phpMyAdmin
- Encyclopedia - Roundcube
- Encyclopedia - Web Hosting Control Panel
Navigation
- To post registration and login required
- 256 views