In this tutorial, I will show you how to install PHP 8 on your CentOS/RHEL server.
Enable EPEL and Remi Repository
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpmInstall PHP 8
Get a list of available PHP module streams.
dnf module list phpBefore installing you need to enable php:remi-8.0
dnf module enable php:remi-8.0After that, you are able to install PHP 8
dnf install phpVerify installation
php -vI have httpd installed on my server, so I can verify PHP 8 installation in PHP sample file.
echo "<?php phpinfo();" > /var/www/html/info.phpNow open in browser http:/your-IP/info.php
That’s all, you have successfully installed PHP 8 on your CentOS/RHEL server




