Enable php 7.4 on CentOS Stream
First lets get a listing of current php modules available for stream
# dnf module list php Last metadata expiration check: 3:08:30 ago on Thu 16 Dec 2021 10:43:30 AM UTC. CentOS Stream 8 - AppStream Name Stream Profiles Summary php 7.2 [d][e] common [d], devel, minimal PHP scripting language php 7.3 common [d], devel, minimal PHP scripting language php 7.4 common [d], devel, minimal PHP scripting language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
We need to disable the current PHPmodule 7.2
# dnf module disable php:7.2 Last metadata expiration check: 3:03:41 ago on Thu 16 Dec 2021 10:43:30 AM UTC. Only module name is required. Ignoring unneeded information in argument: 'php:7.2' Dependencies resolved. =================================================================================================================================================================================================== Package Architecture Version Repository Size =================================================================================================================================================================================================== Disabling modules: php Transaction Summary =================================================================================================================================================================================================== Is this ok [y/N]: y Complete!
Enable PHP version 7.4
# dnf module enable php:7.4 Last metadata expiration check: 3:04:02 ago on Thu 16 Dec 2021 10:43:30 AM UTC. Dependencies resolved. =================================================================================================================================================================================================== Package Architecture Version Repository Size =================================================================================================================================================================================================== Enabling module streams: php 7.4 Transaction Summary =================================================================================================================================================================================================== Is this ok [y/N]: y Complete!
Now update php
# dnf update php Last metadata expiration check: 3:04:36 ago on Thu 16 Dec 2021 10:43:30 AM UTC. Dependencies resolved. =================================================================================================================================================================================================== Package Architecture Version Repository Size =================================================================================================================================================================================================== Upgrading: php x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 1.5 M php-cli x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 3.1 M php-common x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 702 k php-fpm x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 1.6 M php-gd x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 85 k php-intl x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 193 k php-json x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 74 k php-mbstring x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 484 k php-mysqlnd x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 193 k php-pdo x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 123 k php-pecl-zip x86_64 1.18.2-1.module_el8.3.0+396+9a0d79d6 appstream 55 k php-soap x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 176 k php-xml x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 174 k php-xmlrpc x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 90 k Installing dependencies: oniguruma x86_64 6.8.2-2.el8 appstream 187 k Installing weak dependencies: php-opcache x86_64 7.4.19-1.module_el8.5.0+815+1c4fd2e5 appstream 267 k Transaction Summary =================================================================================================================================================================================================== Install 2 Packages Upgrade 14 Packages Total download size: 8.9 M Is this ok [y/N]: y Downloading Packages: (1/16): oniguruma-6.8.2-2.el8.x86_64.rpm 890 kB/s | 187 kB 00:00 (2/16): php-opcache-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 1.1 MB/s | 267 kB 00:00 (3/16): php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 3.5 MB/s | 702 kB 00:00 (4/16): php-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 3.1 MB/s | 1.5 MB 00:00 (5/16): php-gd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 2.5 MB/s | 85 kB 00:00 (6/16): php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 8.5 MB/s | 1.6 MB 00:00 (7/16): php-json-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 1.4 MB/s | 74 kB 00:00 (8/16): php-mbstring-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 8.1 MB/s | 484 kB 00:00 (9/16): php-cli-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 4.1 MB/s | 3.1 MB 00:00 (10/16): php-pdo-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 2.8 MB/s | 123 kB 00:00 (11/16): php-intl-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 323 kB/s | 193 kB 00:00 (12/16): php-mysqlnd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 327 kB/s | 193 kB 00:00 (13/16): php-xml-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 9.1 MB/s | 174 kB 00:00 (14/16): php-pecl-zip-1.18.2-1.module_el8.3.0+396+9a0d79d6.x86_64.rpm 125 kB/s | 55 kB 00:00 (15/16): php-soap-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 314 kB/s | 176 kB 00:00 (16/16): php-xmlrpc-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm 180 kB/s | 90 kB 00:00 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 4.1 MB/s | 8.9 MB 00:02 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 1/1 Upgrading : php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 1/30 warning: /etc/php.ini created as /etc/php.ini.rpmnew Upgrading : php-pdo-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 2/30 Upgrading : php-xml-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 3/30 Installing : php-opcache-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 4/30 Upgrading : php-cli-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 5/30 Upgrading : php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 6/30 Running scriptlet: php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 6/30 Upgrading : php-json-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 7/30 Installing : oniguruma-6.8.2-2.el8.x86_64 8/30 Running scriptlet: oniguruma-6.8.2-2.el8.x86_64 8/30 Upgrading : php-mbstring-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 9/30 Upgrading : php-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 10/30 Upgrading : php-xmlrpc-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 11/30 Upgrading : php-mysqlnd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 12/30 Upgrading : php-gd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 13/30 Upgrading : php-intl-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 14/30 Upgrading : php-pecl-zip-1.18.2-1.module_el8.3.0+396+9a0d79d6.x86_64 15/30 Upgrading : php-soap-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 16/30 Cleanup : php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 17/30 Cleanup : php-pecl-zip-1.15.3-1.module_el8.2.0+313+b04d0a66.x86_64 18/30 Cleanup : php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 19/30 Running scriptlet: php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 20/30 Cleanup : php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 20/30 Cleanup : php-xmlrpc-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 21/30 Cleanup : php-xml-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 22/30 Cleanup : php-soap-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 23/30 Cleanup : php-mysqlnd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 24/30 Cleanup : php-pdo-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 25/30 Cleanup : php-mbstring-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 26/30 Cleanup : php-json-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 27/30 Cleanup : php-intl-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 28/30 Cleanup : php-gd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 29/30 Cleanup : php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 30/30 Running scriptlet: php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 30/30 Running scriptlet: php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 30/30 Verifying : oniguruma-6.8.2-2.el8.x86_64 1/30 Verifying : php-opcache-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 2/30 Verifying : php-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 3/30 Verifying : php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 4/30 Verifying : php-cli-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 5/30 Verifying : php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 6/30 Verifying : php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 7/30 Verifying : php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 8/30 Verifying : php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 9/30 Verifying : php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 10/30 Verifying : php-gd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 11/30 Verifying : php-gd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 12/30 Verifying : php-intl-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 13/30 Verifying : php-intl-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 14/30 Verifying : php-json-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 15/30 Verifying : php-json-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 16/30 Verifying : php-mbstring-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 17/30 Verifying : php-mbstring-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 18/30 Verifying : php-mysqlnd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 19/30 Verifying : php-mysqlnd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 20/30 Verifying : php-pdo-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 21/30 Verifying : php-pdo-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 22/30 Verifying : php-pecl-zip-1.18.2-1.module_el8.3.0+396+9a0d79d6.x86_64 23/30 Verifying : php-pecl-zip-1.15.3-1.module_el8.2.0+313+b04d0a66.x86_64 24/30 Verifying : php-soap-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 25/30 Verifying : php-soap-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 26/30 Verifying : php-xml-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 27/30 Verifying : php-xml-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 28/30 Verifying : php-xmlrpc-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 29/30 Verifying : php-xmlrpc-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 30/30 Upgraded: php-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-cli-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-gd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-intl-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-json-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-mbstring-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-mysqlnd-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-pdo-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-pecl-zip-1.18.2-1.module_el8.3.0+396+9a0d79d6.x86_64 php-soap-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-xml-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 php-xmlrpc-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 Installed: oniguruma-6.8.2-2.el8.x86_64 php-opcache-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64 Complete!
Confirm PHP 7.4 is enabled
# dnf module list php Last metadata expiration check: 3:08:30 ago on Thu 16 Dec 2021 10:43:30 AM UTC. CentOS Stream 8 - AppStream Name Stream Profiles Summary php 7.2 [d] common [d], devel, minimal PHP scripting language php 7.3 common [d], devel, minimal PHP scripting language php 7.4 [e] common [d], devel, minimal PHP scripting language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled