How to Install PHP 8.4 for Apache on CentOS Stream 10

To install PHP 8.4 on CentOS Stream 10 for Apache, follow these steps.

Step 1 : Run the following command to update your system and ensure all packages are up-to-date:

Step 2 : The PHP Remi Repository provides the latest PHP packages. Import it by running:

Step 3 : List the available PHP modules to confirm the repository installation:

Step 4 : Enable the repository for PHP 8.4:

Step 5 : Install PHP 8.4 along with its core components:

Step 6 : Install the most frequently used PHP extensions with the following command:

- php-cli: Command-line interface for running PHP scripts.

- php-mysqlnd: Connects PHP to MySQL databases.

- php-curl: Enables making HTTP requests.

- php-gd: Image processing library.

- php-mcrypt: Encryption library for secure data.

- php-json: Handles JSON encoding and decoding.

- php-pear: Package management for PHP extensions.

- php-common: Core PHP features.

- php-xml: XML parsing library.

- php-zip: ZIP file handling.

- php-devel: Development tools for PHP.

- php-xsl: Extensible Stylesheet Language support.

- php-soap: For SOAP protocol handling.

- php-bcmath: For arbitrary-precision arithmetic.

- php-mbstring: Multibyte string support.

- php-gettext: Localization and internationalization support.

- php-imagick: ImageMagick bindings for advanced image processing.

Step 7 : Check if PHP 8.4 has been installed successfully:

Step 8 : Restart Apache to apply the changes

Step 9 : Create a info.php file in your web server's document root:

Step 10 : Visit your server's domain or IP in a browser to see the PHP info page:

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