“TeckMile.com – Elevating Your Skills and Creativity, One Project at a Time.”

Upgrading to PHP 8.2 on RHEL/RockyLinux

Step 1: List Available PHP Modules

To see a list of available PHP modules, run the following command:

dnf module list | grep php

Step 2: Update Your System

Before proceeding, it’s a good practice to update your system:

sudo yum update -y

Step 3: Reboot Your System

After updates, it’s recommended to reboot your system to ensure changes take effect:

sudo reboot

Step 4: Install EPEL Repository

Install the EPEL (Extra Packages for Enterprise Linux) repository:

sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Step 5: Install REMI Repository

Install the REMI repository:

sudo dnf -y install http://rpms.remirepo.net/enterprise/remi-release-8.rpm

Step 6: Update DNF Cache

Update DNF cache to refresh package lists:

sudo dnf makecache -y

Step 7: Reset Default PHP Module

Reset the default PHP module:

sudo dnf module reset php -y

Step 8: Enable PHP 8.2 from REMI Repository

Install PHP 8.2 from the REMI repository:

sudo dnf module install php:remi-8.2 sudo dnf -y install php

Step 9: Check PHP Version

To confirm the PHP version, run:

php -v

Step 10: Install PHP Modules

Install various PHP modules by running:

sudo dnf install php-{ctype,dom,fileinfo,gd,json,openssl,posix,session,simplexml,xmlreader,xmlwriter,zlib,common,pear,cgi,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap,bz2,intl,ldap,smbclient,ftp,imap,gmp,exif,imagick,pcntl,phar}


This guide outlines the steps to update PHP and install various PHP modules. Be sure to adapt the instructions to your specific Linux distribution or version if necessary.


Comments

3 responses to “Upgrading to PHP 8.2 on RHEL/RockyLinux”

  1. DanielCax Avatar

    Cryptocurrency in top terms. Best path to get prosperity.
    Just do it!

    1. You make a great point Daniel, I will be working on a post about crypto in the near future.

  2. Wonderful blog! I found it while surfing around on Yahoo
    News. Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *