How to Install PHP 8.3 in Rocky Linux 8

PHP is a script language and interpreter that is freely available and used primarily on Linux Web servers.

To add EPEL and REMI Repository.

dnf install

dnf -y install

To install yum utilities.

dnf -y install yum-utils

To enable php 8.3 Remi repository.

dnf module reset php

dnf module install php:remi-8.3


[root@vps ~]# dnf module install php:remi-8.3
Last metadata expiration check: 0:00:20 ago on Thu 07 Dec 2023 04:33:20 AM UTC.
Dependencies resolved.
 Package       Arch   Version                                Repository    Size
Installing group/module packages:
 php-cli       x86_64 8.3.0-1.el8.remi                       remi-modular 5.6 M
 php-common    x86_64 8.3.0-1.el8.remi                       remi-modular 1.3 M
 php-fpm       x86_64 8.3.0-1.el8.remi                       remi-modular 1.9 M
 php-mbstring  x86_64 8.3.0-1.el8.remi                       remi-modular 575 k
 php-xml       x86_64 8.3.0-1.el8.remi                       remi-modular 269 k
Installing dependencies:
               noarch 2.4.37-62.module+el8.9.0+1436+2b7d5021 appstream     43 k
 libxslt       x86_64 1.1.32-6.el8                           baseos       249 k
 oniguruma5php x86_64 6.9.9-1.el8.remi                       remi-safe    213 k
Installing weak dependencies:
               noarch 1:1.14.1-9.module+el8.4.0+542+81547229 appstream     23 k
Installing module profiles:
Enabling module streams:
 httpd                2.4
 nginx                1.14
 php                  remi-8.3

Transaction Summary
Install  9 Packages

Total download size: 10 M
Installed size: 47 M
Is this ok [y/N]:

To install any remaining updates.

dnf update

Install PHP 8.3

To install PHP.

dnf install php


[root@vps ~]# dnf install php
Last metadata expiration check: 0:00:56 ago on Thu 07 Dec 2023 04:33:20 AM UTC.
Dependencies resolved.
 Package      Arch   Version                                 Repository    Size
 php          x86_64 8.3.0-1.el8.remi                        remi-modular 1.9 M
Installing dependencies:
 apr          x86_64 1.6.3-12.el8                            appstream    128 k
 apr-util     x86_64 1.6.1-9.el8                             appstream    105 k
 capstone     x86_64 4.0.2-5.el8                             epel         1.1 M
 httpd        x86_64 2.4.37-62.module+el8.9.0+1436+2b7d5021  appstream    1.4 M
 httpd-tools  x86_64 2.4.37-62.module+el8.9.0+1436+2b7d5021  appstream    110 k
 libsodium    x86_64 1.0.18-2.el8                            epel         162 k
 mailcap      noarch 2.1.48-3.el8                            baseos        38 k
 mod_http2    x86_64 1.15.7-8.module+el8.9.0+1370+89cc8ad5.3 appstream    154 k
              noarch 86.3-1.el8                              baseos        24 k
Installing weak dependencies:
 apr-util-bdb x86_64 1.6.1-9.el8                             appstream     24 k
              x86_64 1.6.1-9.el8                             appstream     26 k
 php-opcache  x86_64 8.3.0-1.el8.remi                        remi-modular 610 k
 php-pdo      x86_64 8.3.0-1.el8.remi                        remi-modular 172 k
 php-sodium   x86_64 8.3.0-1.el8.remi                        remi-modular 109 k

Transaction Summary
Install  15 Packages

Total download size: 6.0 M
Installed size: 25 M
Is this ok [y/N]:

To check PHP Version.

php -v


[root@vps ~]# php -v
PHP 8.3.0 (cli) (built: Nov 21 2023 14:40:35) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.0, Copyright (c), by Zend Technologies

This concludes our topic of installing PHP 8.3 on Rocky Linux 9 the system.