L’heure est venue de mettre notre serveur Apollo à jour: jusqu’alors sous Ubuntu 22.04 (jammy jellyfish), nous passons à Ubuntu 24.04 LTS (noble numbat).
On installe l’outil de mise à jour Ubuntu:
apt install ubuntu-release-upgrader-core
On vérifie que l’outil est bien configuré pour récupérer la version LTS:
grep 'lts' /etc/update-manager/release-upgrades
# lts - Check to see if a new LTS release is available. The upgrader
Prompt=lts
Code language: PHP (php)
On ajoute une règle pour ufw
pour ouvrir le port 1022 en cas de souci:
sudo ufw allow 1022/tcp comment 'Open port ssh TCP/1022 as failsafe for upgrades'
Rule added
Rule added (v6)
Code language: JavaScript (javascript)
On lance la mise à jour:
sudo do-release-upgrade -d
Checking for a new Ubuntu release
= Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =
The Ubuntu team is proud to announce Ubuntu 24.04 LTS 'Noble Numbat'.
Reading cache
Checking package manager
Continue running under SSH?
This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.
If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?
Continue [yN] y
Starting additional sshd
To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'
To continue please press [ENTER]
Code language: PHP (php)
Voici ce qui change:
Do you want to start the upgrade?
3 installed packages are no longer supported by Canonical. You can
still get support from the community.
61 packages are going to be removed. 179 new packages are going to be
installed. 731 packages are going to be upgraded.
You have to download a total of 1209 M. This download will take about
4 minutes with a 40Mbit connection and about 32 minutes with a 5Mbit
connection.
Fetching and installing the upgrade can take several hours. Once the
download has finished, the process cannot be canceled.
Continue [yN] Details [d]
Code language: PHP (php)
Quelques minutes plus tard, c’est l’heure du reboot:
System upgrade is complete.
Restart required
To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.
Code language: JavaScript (javascript)
On vérifie que l’on est bien sur la nouvelle version:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
Code language: CSS (css)
Il ne reste plus qu’à réactiver les repo apt qui ont été désactivés pendant la mise à jour:
add-apt-repository ppa:ondrej/php
add-apt-repository ppa:ondrej/nginx-mainline
add-apt-repository ppa:ubuntuhandbook1/transmission
Ensuite, il faut faire le ménage dans le répertoire /etc/apt/sources.list.d
:
ls -lash /etc/apt/sources.list.d
Code language: PHP (php)
et changer les occurences “jammy” en “noble”.
Enfin, il nous faut reconfigurer les paquets qui peuvent avoir été désinstallés:
# MySQL
dpkg-reconfigure mysql-apt-config
# Python deps
apt install pipx
sudo rm /usr/local/bin/flexget /usr/local/bin/flexget-headless
pipx install flexget subliminal
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
pipx inject flexget subliminal
Code language: PHP (php)
Il vous suffit ensuite de lancer les mises à jour pour retrouver des paquets mis à jour pour noble numbat:
apt update && apt upgrade
Bonne migration !
Vous voulez un site WordPress ou WooCommerce qui soit à la fois rapide et performant? Vous êtes au bon endroit.