To install PHP 8.3 on CentOS Stream 9, follow the steps below.
Step 1 : Ensure your system is up-to-date by running the following command.
Step 2 : Import the PHP Remi repository using the following command.
Step 3 : Verify available PHP modules using the command.
Step 4 : Enable the PHP Remi repository for PHP 8.3.
Step 5 : Install PHP core components, including php83, php83-php-fpm, and cli.
Step 6 : Install commonly used PHP extensions. Adjust the list according to your specific needs.
Explanation of Extensions:
- mysqlnd: MySQL Native Driver
- curl: Client URL Library
- gd: Graphics Draw
- mcrypt: Encryption functions
- json: JavaScript Object Notation support
- pear: PHP Extension and Application Repository support
- common: Common functionality
- xml: XML support
- zip: ZIP archive support
- devel: Development tools
- xsl: XSLT support
- soap: Simple Object Access Protocol support
- bcmath: Binary Calculator
- mbstring: Multibyte support
- gettext: Gettext support
- imagick: ImageMagick PHP extension
Step 7 : Check the installed PHP version to ensure the installation was successful.
Congratulations! You have successfully installed PHP 8.3 on CentOS Stream 9.