8.2 PHP RedHat

How to install PHP 8 on Red Hat/ CentOS 8 Linux

INSTALLATION PHP 8.2 IN RedHat/CENTOS SERVER 8

[root@rserver8 ~]# dnf update && upgrade

Can use this or this.

[root@rserver8 ~]# dnf update

[root@rserver8 ~]# dnf upgrade

Enable EPEL repository

[root@rserver8 ~]# sudo dnf install -y epel-release

Configure the Remi repository for installing PHP 8 on CentOS 8

 Enableremi-release-8.rpm

[root@rserver8 ~]# sudo dnf install -y  http://rpms.remirepo.net/enterprise/remi-release-8.rpm

[root@rserver8 ~]# sudo dnf install -y dnf-utils

Find the current enabled version of PHP

[root@rserver8 ~]# sudo dnf module list php

Reseting PHP

[root@rserver8 ~]# sudo dnf module reset php

Enable the module PHP

[root@rserver8 ~]# sudo dnf module install -y php:remi-8.2

If php 8.2 is not default can enable 8.2 PHP

[root@rserver8 ~]# dnf module enable php:remi-8.2

Checking the PHP Current installed enable version

[root@rserver8 ~]# php -v