How to Install PHP 8.2 on AlmaLinux 10

This guide will help you install PHP 8.2 on AlmaLinux 10 using the Remi repository.
⚠️ NOTE: Remi's repository is a reliable source for newer PHP versions on RHEL-based systems.

Update the system

dnf update -y

Install EPEL (Extra Packages for Enterprise Linux)

dnf install epel-release -y

Output:

Running transaction
  Preparing        :                                                        1/1
  Installing       : epel-release-10-6.el10.noarch                          1/1
  Running scriptlet: epel-release-10-6.el10.noarch                          1/1
Many EPEL packages require the CodeReady Builder (CRB) repository.
It is recommended that you run /usr/bin/crb enable to enable the CRB repository.

Installed:
  epel-release-10-6.el10.noarch

Complete!

Install Remi repository

dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm

Output:

================================================================================
Installing:
 remi-release      noarch      10.0-3.el10.remi         @commandline       33 k

Transaction Summary
================================================================================
Install  1 Package

Total size: 33 k
Installed size: 34 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : remi-release-10.0-3.el10.remi.noarch                   1/1

Installed:
  remi-release-10.0-3.el10.remi.noarch

Complete!

Enable Remi repository for PHP 8.2

dnf module enable php:remi-8.2 -y

Output:

[root@server ~]# dnf module enable php:remi-8.2 -y
Remi's Modular repository for Enterprise Linux  1.1 MB/s | 205 kB     00:00
Safe Remi's RPM repository for Enterprise Linux 1.8 MB/s | 357 kB     00:00
Last metadata expiration check: 0:00:01 ago on Wed May 28 21:09:44 2025.
Dependencies resolved.
================================================================================
 Package           Architecture     Version             Repository         Size
================================================================================
Enabling module streams:
 php                                remi-8.2

Transaction Summary
================================================================================

Complete!

Install PHP 8.2 and common extensions

dnf install -y php php-cli php-common php-fpm php-mysqlnd php-opcache php-xml php-mbstring php-curl php-gd php-json

Verify PHP version

php -v

Output:

[root@server ~]# php -v
PHP 8.2.28 (cli) (built: Mar 11 2025 17:58:12) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.28, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.28, Copyright (c), by Zend Technologies

✅ You should now have PHP 8.2 installed and ready to use on AlmaLinux 10.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS