Install PHP 8 on Fedora 35 - Step by step guide ?

Fedora

PHP is an open-source, general-purpose scripting language that is especially suited to web development but has also been used as a general-purpose programming language. PHP 8.1 is a significant update of the PHP language that will be "officially" released on November 25, 2021. This is a standard upgrade going forward from the existing PHP 8.0 release with the new PHP 8.1 is bringing enums, fibers, never return type, final class constants, and many more.

Here at Fixwebnode, as part of our Server Management Services, we regularly help our Customers to perform related PHP queries.

In this context, we shall look into how to install PHP 8 on Fedora 35.

 

Steps to Install PHP 8 on Fedora 35

1. Perform System Update

To start off, you need to update your Fedora operating system to make sure all existing packages are up to date by running the below commands:

$ sudo dnf upgrade
$ sudo dnf update
$ sudo dnf install dnf-plugins-core

 

2. Install PHP 8 on the system

By default, PHP is not available on Fedora 35 base repository. Then we add the Remi repository  to your system with the following command below:

$ sudo dnf install http://rpms.remirepo.net/fedora/remi-release-35.rpm

After that, reset the PHP module and enable PHP 8 from the remi-8.0 module using the following command:

$ sudo dnf module reset php
$ sudo dnf config-manager --set-enabled remi
$ sudo dnf module enable php:remi-8.1

Finally, you can install PHP 8.0 with the following command below:

$ sudo dnf module install php:remi-8.1

Check installed version of PHP on your Fedora Linux:

$ php -v
PHP 8.1.0RC6 (cli) (built: Nov  20 2021 10:15:52) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.0-dev, Copyright (c) Zend Technologies

 

3. Install PHP 8 Extensions

Optionally, if you would like to install PHP extensions using the name format php-<extension>. For example:

$ sudo dnf install 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

 

[Need to configure PHP on your Linux system ? We can help you. ]

 


Your Cart