Solution: Install PHP 7.3 on CentOS, RHEL or Fedora

Development | Programming languages
Author
Description
Here is a quick howto upgrade default PHP version provided on Fedora, RHEL or CentOS with latest version 7.3.
Repositories configuration:
On Fedora, standards repositories are enough, on Enterprise Linux (RHEL, CentOS) the Extra Packages for Enterprise Linux (EPEL) repository must be configured, and on RHEL the optional channel must be enabled.
Attachments
No attachments.
Solutions
Fedora 29
wget http://rpms.remirepo.net/fedora/remi-release-29.rpm
dnf install remi-release-29.rpm

Fedora 28
wget http://rpms.remirepo.net/fedora/remi-release-28.rpm
dnf install remi-release-28.rpm

RHEL version 8.0 Beta
wget http://rpms.remirepo.net/enterprise/remi-release-8.rpm
rpm -Uvh remi-release-8.rpm

RHEL version 7.6
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
>wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
subscription-manager repos --enable=rhel-7-server-optional-rpms

RHEL version 6.10
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
rhn-channel --add --channel=rhel-$(uname -i)-server-optional-6

CentOS version 7.6
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

CentOS version 6.10
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
 

php module usage
Since Fedora 29 and RHEL-8 beta, you can simply use the remi-7.3 stream of the php module

dnf module install php:remi-7.3
 
remi-php73 repository activation
Needed packages are in the remi-safe (enabled by default) and remi-php73 repositories, the latest is not enabled by default (administrator choice according to the desired PHP version).

RHEL or CentOS
yum install yum-utils
yum-config-manager --enable remi-php73

Fedora
dnf install dnf-plugins-core
dnf config-manager --set-enabled remi-php73
 

PHP upgrade
By choice, the packages have the same name than in the distribution, so a simple update is enough:

yum update
That's all :)

$ php -v
PHP 7.3.0 (cli) (built: Dec  4 2018 16:12:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.0, Copyright (c) 1999-2018, by Zend Technologies
 

Known issues
The upgrade can fail (by design) when some installed extensions are not yet compatible with  PHP 7.3.
See the compatibility tracking list: PECL extensions RPM status

If these extensions are not mandatory, you can remove them before the upgrade, else, you will have to be patient.

Warning: some extensions are still under development (xdebug...), but it seems useful to provide them to allow upgrade to more people, and to allow user to give feedback to the authors.

on August 27th, 2019 (9:21 pm)
What masters said
You must sign in to comment!!
All comments
This solution has not been commented yet.