Install PHP 7.4 on CentOS 8

This is surprisingly simple if you don’t want to mess around with multiple versions and just switch to 7.4. Run as root:

# dnf -y module reset php
# dnf -y module install php:7.4

Then in my installation a few pecl modules needed to be reinstalled (zip needs the extra step below):

# pecl uninstall imagick && pecl install imagick
# pecl uninstall mcrypt && pecl install mcrypt
# dnf -y install libzip libzip-devel
# pecl uninstall zip && pecl install zip

And finally restart the web server:

# systemctl restart httpd php-fpm

Tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *