How To Install PHP 7.4 on CentOS 8

How to Install PHP 7.4 on CentOS 8

 

CentOS 8 by default distributed with PHP 7.2. In this article you will learn how to install PHP 7.4 on CentOS 8. Also I will show PHP 7.3 installation.

 

CentOS 8 REMI Repository Install

 

To install PHP latest stable version on CentOS 8 Linux we need add REMI repository in our system. REMI repository contains latest stable version of PHP – 7.4 7.3 and 7.2.

To add/install the REMI repository on your CentOS 8:

# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
# yum update

yum update will ask: upgrade epel-release, press ‘y’.

As you see on picture below REMI repository contains beside PHP 7.2 contains also PHP 7.3 and 7.4 versions.

# dnf module list php

dnf module list php

 

Installing PHP on CentOS 8

 

Install PHP 7.4

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

Install PHP 7.3

# dnf module reset
# dnf module install php:remi-7.3

Install PHP Modules

If you need install additional PHP modules for your PHP applications, install PHP modules:

# dnf install php-gd php-mysqlnd php-mcrypt

 

PHP version check

To verify PHP installed version, run the following command:

php -v

Your output should be something like:

PHP 7.4.3 (cli) (built: Feb 18 2020 11:53:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

 

This output indicates PHP 7.4 successfully installed in our system.

 

How To Install REMI and EPEL Repositories on CentOS 6.x x64 

Best Hard Drives for NAS and computers.


 

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee

Summary
How to Install PHP 7.4 on CentOS 8
Article Name
How to Install PHP 7.4 on CentOS 8
Description
In this article you will learn how to install install PHP 7.4 on CentOS 8. Also I will show PHP 7.3 installation. CentOS 8 REMI Repository Install
Author
Publisher Name
ARSTECH
Publisher Logo

arstech

Leave a Reply

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