(: September 19, 2019)
How can I 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. The official release of PHP 7.4 for public use is November 28, 2019. As of this writing, only RC releases are available for Developers to play with new PHP 7.4 features.
PHP 7.4 comes with a remarkable amount of new features. Its RPM packages are available in the remi-php74 repository for Fedora ≥ 29. Follow the few steps below to install PHP 7.4 on Fedora 31/30/29.
Step 1: Update Fedora system
Pull latest updates for installed packages.
sudo dnf -y update
Step 2: Add REMI Repository
Run the commands below to add 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 dependencies required are available in remi repository. Enable remi and remi-php74 repository.
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 the y key when prompted to begin installation of PHP 7.4 on Fedora 31/30/29:
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 current PHP version installed.
$ php -v
PHP 7.4.0RC2 (cli) (built: Sep 17 2019 16:37:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies
To install additional 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 enabled modules, run:
$ php --modules
You now have PHP 7.4 installed on Fedora 31/30/29. Until next time stay connected for latest Linux how-to guides and other Tech tutorials.
Installation of 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