As our upgrade article had a lot of attention, we also would like to document the upgrade process for php from version 8.1 to the supported version 8.2.

Please keep in mind that although this is the currently supported version do not forget to check the compatibility of this version with the applications that you run on the machines prior to doing the upgrade.

Here are two links to wordpress and nextcloud references regarding their php requirements :

PHP requirements of WordPress

Nextcloud:

https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html

Installation of php 8.2

First check if you have the necessary tools in place:

dnf install epel-release<br><br>dnf install http://rpms.remirepo.net/enterprise/remi-release-9.rpm

Then we check if we already have the dns-utils package available:

dnf install dnf-utils

Then check what you have already on the system with:

dnf module list php

You should see something like this:

Rocky Linux 9 - AppStream
Name Stream Profiles Summary
php 8.1 common [d], devel, minimal PHP scripting language

Remi's Modular repository for Enterprise Linux 9 - x86_64
Name Stream Profiles Summary
php remi-7.4 common [d], devel, minimal PHP scripting language
php remi-8.0 common [d], devel, minimal PHP scripting language
php remi-8.1 common [d], devel, minimal PHP scripting language
php remi-8.2 [e] common [d], devel, minimal PHP scripting language
php remi-8.3 common [d], devel, minimal PHP scripting language

That shows what options you have to install. In our case we already have php 8.1 installed, so we first need to reset that. If you simply enable 8.2 you get this output:

dnf module enable php:remi-8.2
Last metadata expiration check: 0:00:36 ago on Thu Apr 11 08:56:22 2024.
Dependencies resolved.
The operation would result in switching of module 'php' stream 'remi-8.1' to stream 'remi-8.2'
Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch.
It is recommended to rather remove all installed content from the module, and reset the module using 'dnf module reset ' command. After you reset the module, you can install the other stream.

We need to reset the php version first on the system with:

dnf module reset php

then we could do the real work with:

dnf module enable php:remi-8.2

After completion, a simple dnf update does the „real“ upgrade to 8.2.

Then we did restart the dependent processes (in our case php-fpm and httpd) to be on the safe side.

As always, feedback is more than welcome.

Upgrading from php 8.1 to 8.2 on rocky linux 9

Beitragsnavigation


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert