How to Install PHP 8.0 on Rocky Linux 9

To install PHP 8.0 on Rocky Linux 9, follow these steps.

Step 1 : Ensure your system is up-to-date by running the following command:

Step 2 : Install the Remi repository by executing the command:

Step 3 : Verify available PHP modules using the command:

Step 4 : Enable the Remi repository with the command:

Step 5 : Install PHP core packages including php80, php80-php-fpm, and cli:

Step 6 : Install Common PHP Extensions

- mysqlnd: The MySQL native driver provides improved performance and support for new MySQL features.

- curl: Allows PHP to make HTTP requests and interact with various protocols.

- gd: The GD Graphics Library enables PHP to create and manipulate images.

- mcrypt: Deprecated in PHP 7.1 and removed in PHP 7.2, but still used in legacy applications for encryption.

- json: Provides JSON (JavaScript Object Notation) support for encoding and decoding data.

- pear: PHP Extension and Application Repository, a framework and distribution system for reusable PHP components.

- common: Common files shared among different PHP extensions.

- xml: Adds support for XML parsing and manipulation.

- zip: Enables handling of ZIP archives.

- devel: Development files for building PHP extensions.

- xsl: Allows for the transformation and manipulation of XML documents using XSLT.

- soap: Provides support for Simple Object Access Protocol (SOAP) to enable web services.

- bcmath: Offers arbitrary precision mathematics functions.

- mbstring: Multibyte string functions for handling multibyte encodings.

- gettext: Adds internationalization and localization support.

- imagick: Allows PHP to interact with the ImageMagick image manipulation library.

Step 7 : Check the installed PHP version with:

Congratulations! You have successfully installed PHP 8.0 on Rocky Linux 9.