How to Install PHP 8.4 on CentOS Stream 10

To install PHP 8.4 on CentOS Stream 10, follow the steps outlined below.

Step 1 : First, ensure your system is up to date by running the following command:

Step 2 : Next, import the PHP Remi repository, which provides the PHP 8.4 package for CentOS Stream 10. Run the command:

Step 3 : Verify the available PHP modules by running:

Step 4 : To enable the Remi repository and make PHP 8.4 available, run the following command:

Step 5 : Install PHP 8.4 along with PHP-FPM and CLI by running the following command:

Step 6 : Install the extensions with the following command:

- mysqlnd: MySQL Native Driver for PHP

- curl: cURL support for PHP (used for URL manipulation)

- gd: Graphics Library for dynamic image creation

- mcrypt: Library for encryption (legacy, deprecated in newer PHP versions)

- json: JSON support for PHP (used to work with JSON data)

- pear: PHP Extension and Application Repository (PEAR) support

- common: Common libraries and configurations

- xml: XML support for parsing XML data

- zip: Zip compression library for PHP

- devel: PHP development files (useful for compiling other extensions)

- xsl: Extensible Stylesheet Language (XSL) support

- soap: SOAP support for web services

- bcmath: Arbitrary precision mathematics for PHP

- mbstring: Multibyte string support

- gettext: Support for internationalization (gettext library)

- imagick: PHP extension for ImageMagick (image manipulation)

Step 7 : To confirm PHP 8.4 is installed correctly, check the PHP version by running:

Congratulations! You have successfully installed PHP 8.4 on CentOS Stream 10.