How To Install PHP 7.3 on CentOS 8

In this tutorial, we learn how to install the latest PHP 7.3 in CentOS 8. PHP 7.3.10 is the current stable release of PHP released on 26 Step 2019. CentOS 8 was released on 24 Sept 2019. By default CentOS 8 provides PHP version 7.2 in its official repository.

  • You can read the new features and bug fixes of the latest release of PHP in the Changelog.

PHP is one of the most used Server Side Scripting language. According to a report by the datanyze website PHP having approx 42.75% market share which is the highest among all the other languages.

As always, we will do it in simple and easy to learn steps. So let, start the installation of PHP 7.3.10.

Step 1: Install and setup the YUM Repositories

At the very first step, we need to install and enable the EPEL and the Remi repository for our system. So let’s start with the EPEL repository.

Install the EPEL repository configuration package by using the below command.

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
install-epel-8.6-repo-in-centos-8

After that install the Remi Repository configuration package using the below command.

dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

Step 2: Install the latest PHP 7.3.10 on CentOS 8

To get the list of available PHP packages by using the below command.

yum list | grep php

Finally, install the PHP 7.3 using the below command.

dnf module install php:remi-7.3
install-php-7.3-in-centos-8

For installing PHP 7.2 use the below command.

dnf module install php:remi-7.2

Step 3: Install PHP Modules

After that, if you want to install the additional modules of PHP use the below command.

dnf install php-cli php-json php-xml php-bcmath php-gd
install-php-modules-in-centos-8

Step 4: Verify the installation

The last and most satisfiable stage is to verify the install. Use the below command to verify PHP 7.3 installation.

php -v
verify-php-7.3-install-in-centos-8

Summary:

In this tutorial we learn, How to install the latest PHP 7.3 in CentOS 8 Linux. If I missed something in this tutorial, you can mention it in a comment. Also, ask if any error occurred during installation.

Leave a Comment