26 Mar 2023
Installing PHP 8 on CentOS 7
To install PHP 8 on CentOS 7, follow these steps:
Enable the Remi repository:
sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Install the yum-utils package:
sudo yum install -y yum-utils
Use the yum-config-manager command to enable the Remi PHP 8.0 repository:
sudo yum-config-manager --enable remi-php80
Install PHP 8 and the necessary extensions:
sudo yum install -y php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd
Verify the PHP version:
php -v
You should see output similar to this:
PHP 8.0.0 (cli) (built: Nov 24 2020 18:03:10) ( NTS )
That's it! You have successfully installed PHP 8 on CentOS 7.