How to install PHP 7.4 on Fedora 31/30/29

How to install PHP 7.4 on Fedora 31/30/29? PHP is the most widely used server-side scripting language for creating dynamic web pages and web applications. PHP 7.4 for public use was officially released on November 28, 2019.

PHP 7.4 comes with a lot of new features. Its RPM package is available at remi-php74 Database Fedora 29. Please follow these steps to install PHP 7.4 on Fedora 31/30/29.

Step 1: Update Fedora System

Pull the latest updates for installed packages.

sudo dnf -y update

Step 2: Add the REMI repository

Run the following command to add the REMI repository to your Fedora system.

# Fedora 31
sudo dnf -y install https://rpms.remirepo.net/fedora/remi-release-31.rpm

# Fedora 30
sudo dnf -y install https://rpms.remirepo.net/fedora/remi-release-30.rpm

# Fedora 29
sudo dnf -y install https://rpms.remirepo.net/fedora/remi-release-29.rpm

Step 3: Install PHP 7.4 on Fedora 31/30/29

Some required dependencies are in Remy database. Enable Remy with remi-php74 database.

sudo dnf config-manager --set-enabled remi
sudo dnf config-manager --set-enabled remi-php74

Install PHP 7.4 on Fedora 31/30/29:

sudo dnf module install php:remi-7.4
sudo dnf update

Press ÿ When prompted to start installing PHP 7.4 on Fedora 31/30/29, enter the following key:

Waiting for process with pid 16660 to finish.
Fedora Modular 30 - x86_64                                                                                          40 kB/s |  24 kB     00:00    
Fedora Modular 30 - x86_64 - Updates                                                                                29 kB/s |  21 kB     00:00    
Fedora 30 - x86_64 - Updates                                                                                        32 kB/s |  16 kB     00:00    
Fedora 30 - x86_64 - Updates                                                                                        49 MB/s |  24 MB     00:00    
Fedora 30 - x86_64                                                                                                 151 kB/s |  24 kB     00:00    
Remi's Modular repository - Fedora 30 - x86_64                                                                      27 kB/s | 3.5 kB     00:00    
Remi's RPM repository - Fedora 30 - x86_64                                                                          24 kB/s | 3.0 kB     00:00    
Dependencies resolved.
===================================================================================================================================================
 Package                              Architecture               Version                                    Repository                        Size
===================================================================================================================================================
Installing group/module packages:
 php-cli                              x86_64                     7.4.0~RC2-3.fc30.remi                      remi-modular                     4.5 M
 php-common                           x86_64                     7.4.0~RC2-3.fc30.remi                      remi-modular                     1.1 M
 php-fpm                              x86_64                     7.4.0~RC2-3.fc30.remi                      remi-modular                     1.6 M
 php-json                             x86_64                     7.4.0~RC2-3.fc30.remi                      remi-modular                      39 k
 php-mbstring                         x86_64                     7.4.0~RC2-3.fc30.remi                      remi-modular                     487 k
 php-xml                              x86_64                     7.4.0~RC2-3.fc30.remi                      remi-modular                     175 k
Installing dependencies:
 httpd-filesystem                     noarch                     2.4.41-1.fc30                              updates                           15 k
 libxslt                              x86_64                     1.1.33-1.fc30                              updates                          237 k
 nginx-filesystem                     noarch                     1:1.16.1-1.fc30                            updates                           11 k
 oniguruma                            x86_64                     6.9.2-2.fc30                               updates                          193 k
Installing module profiles:
 php/common                                                                                                                                       
Enabling module streams:
 php                                                             remi-7.4                                                                         

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

Total download size: 8.3 M
Installed size: 53 M
Is this ok [y/N]: y

Confirm the currently installed PHP version.

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

To install other PHP packages / extensions, use the command syntax:

sudo yum install php-xxx

example:

sudo yum install php  php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json

To view the enabled modules, run:

$ php --modules

You have now installed PHP 7.4 on Fedora 31/30/29. Until the next connection, stay in touch for the latest Linux operating guides and other technical tutorials.

Install PHP 7.4 on other systems.

How to install PHP 7.4 on Debian 10 / Debian 9

How to install PHP 7.4 on CentOS 8 / RHEL 8

How to install PHP 7.4 on Ubuntu

How to install PHP 7.4 on CentOS 7

Sidebar