How to install PHP7.4 in CentOS

This guide provides steps to install PHP 7.4 on CentOS 8 / RHEL 8 Linux system. Interested developers can already use PHP 7.4 in a production environment. The official release date of the official version is November 28, 2019.

Please follow the steps below to install PHP 7.4 on CentOS 8 / RHEL 8.

Step 1: Add EPEL and REMI libraries

The EPEL and REMI libraries are required for installation. Add it to the system with the following command

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

Step 2: Install PHP 7.4 on CentOS 8 / RHEL 8

After adding related libraries, enable and install the Remi module of PHP 7.4.

sudo dnf -y install dnf-utils

Enable module flow for PHP 7.4

sudo dnf module install php:remi-7.4

Accept the installation prompt

Updating Subscription Management repositories.
Last metadata expiration check:0:00:24 ago on Mon 16 Sep 201909:36:21 AM EDT.
Dependencies resolved.===================================================================================================================================================
 Package           Arch       Version                      Repository                  Size
===================================================================================================================================================
Installing group/module packages:
 php-cli           x86_64      7.4.0~RC1-1.el8.remi               remi-modular                4.6 M
 php-common         x86_64      7.4.0~RC1-1.el8.remi               remi-modular                1.2 M
 php-fpm           x86_64      7.4.0~RC1-1.el8.remi               remi-modular                1.6 M
 php-json          x86_64      7.4.0~RC1-1.el8.remi               remi-modular                 71 k
 php-mbstring        x86_64      7.4.0~RC1-1.el8.remi               remi-modular                524 k
 php-xml           x86_64      7.4.0~RC1-1.el8.remi               remi-modular                211 k
Installing dependencies:
 nginx-filesystem      noarch      1:1.14.1-8.module+el8+2505+fe936cef        rhel-8-for-x86_64-appstream-rpms       24 k
 oniguruma          x86_64      6.8.2-1.el8                    rhel-8-for-x86_64-appstream-rpms      188 k
 httpd-filesystem      noarch      2.4.37-11.module+el8.0.0+2969+90015743      rhel-8-for-x86_64-appstream-rpms       34 k
 libxslt           x86_64      1.1.32-3.el8                   rhel-8-for-x86_64-baseos-rpms        249 k
Installing module profiles:
 php/common                                                                    
Enabling module streams:
 httpd                     2.4                                                
 nginx                     1.14                                                
 php                      remi-7.4                                              

Transaction Summary
===================================================================================================================================================
Install 10 Packages

Total download size:8.6 M
Installed size:43 M
Is this ok [y/N]: y

Use the following command to install additional packages

sudo dnf update
sudo yum install php-xxx

The current PHP version should be 7.4

$ php -v
PHP 7.4.0(cli)(built: Nov 26201920:13:36)( NTS )Copyright(c) The PHP Group
Zend Engine v3.4.0,Copyright(c) Zend Technologies

View the enabled modules:

$ php --modules

You have successfully installed PHP 7.4 on CentOS 8 / RHEL 8.

Original address: https://computingforgeeks.com/how-to-install-php-7-4-on-centos-rhel-8/

The above is the whole content of this article, I hope it will be helpful to everyone's study.

Recommended Posts

How to install PHP7.4 in CentOS
How to install php7.3 in centos8 custom directory
How to install HDP2.6 in Centos7.2
How to install PHP on CentOS 8
Install php in centos
How to install Android SDK in centos7
How to install Helm in Ubuntu
How to install MySQL on CentOS 8
How to install Memcached on CentOS 8
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install mysql in Ubuntu 14.04
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
CentOS install PHP
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Postgresql on CentOS 8
How to install Wordpress on Centos
How to install htop on CentOS 8
How to install mysql in Ubuntu 14.04
How to install TeamViewer on CentOS 8
How to install MariaDB on CentOS 8
How to install MongoDB on CentOS 7
How to install Odoo 13 on CentOS 8
How to install Apache on CentOS 8
How to install OpenCV on CentOS 8
How to install MongoDB on CentOS 8
How to compile and install PHP and Nginx in Ubuntu environment
How to install Apache Maven on CentOS 8
How to install third-party modules in Python
How to install Apache Kafka on CentOS 7
How to install cuda10.1 driver in Ubuntu
How to install ROS Noetic in Ubuntu20.04
[Graphic] How to install tomcat on centos
R&D: How To Install Python 3 on CentOS 7
How to install GCC compiler on CentOS 7
How to install offline JDK1.8 on centos7.0
Install MySQL5.7 in centos7
Install redis5.0 in CentOS7
How to install and configure Elasticsearch on CentOS 7