Setup PHP 7.4 in CentOS 8

In this post we will see, how to easily install php 7.4 in CentOS 8

Install php 7.4 on Centos 8

[root@sal-test ~]# yum-y update

Install extra packages repository for enterprise Linux

[root@sal-test ~]# yum -y install epel-release

Install remi repository for CentOs 8

[root@sal-test ~]# yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

Enable remi repository for php 7.4

[root@sal-test ~]# yum module enable php:remi-7.4
Remi's Modular repository for Enterprise Linux 8 - x86_64 506 kB/s | 577 kB 00:01
Safe Remi's RPM repository for Enterprise Linux 8 - x86_64 1.1 MB/s | 1.5 MB 00:01
Dependencies resolved.
Package Architecture Version Repository Size

Enabling module streams:
php remi-7.4

Transaction Summary

Is this ok [y/N]: y
Complete!

[root@sal-test ~]# yum install php php-cli php-common
Last metadata expiration check: 0:01:42 ago on Mon Sep 7 15:19:00 2020.
Dependencies resolved.
Package Architecture Version Repository Size

Installing:
php x86_64 7.4.10-1.el8.remi remi-modular 3.0 M
php-cli x86_64 7.4.10-1.el8.remi remi-modular 4.6 M
php-common x86_64 7.4.10-1.el8.remi remi-modular 1.2 M

[root@sal-test ~]# php -v
PHP 7.4.10 (cli) (built: Sep 1 2020 13:58:08) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.10, Copyright (c), by Zend Technologies

Done.

Leave a Comment

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