This installation method uses binaries provided by a third-party provider. It contains patches to the PHP source code added by the build provider, over which the PHP project has no control.

On the command line, run the commands below:


# Add the Remi's RPM repository.
sudo subscription-manager repos --enable codeready-builder-for-rhel-$(rpm -E %rhel)-$(arch)-rpms
sudo dnf install -y dnf-plugins-core
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-$(rpm -E %rhel).rpm


# Install PHP (multiple versions).
sudo dnf install -y php

sudo dnf module reset php -y
sudo dnf module enable php:remi- -y

# Install PHP (single/default version).
sudo dnf install -y php