In this tutorial, I guide you on how to install PHP 7 on CentOS 7!
First, you need to download the REMI repository file for CentOS containing the latest version of PHP at http://rpms.remirepo.net/enterprise/remi-release-7.rpm.
Because REMI repository depends on EPEL repository, you need to install EPEL repository first:
1 |
sudo yum install epel-release |
Result:
Then use the rpm tool to install the REMI repository rpm file:
1 |
sudo rpm -ivh remi-release-7.rpm |
Result:
At this point, you can use the following command to install PHP 7:
1 |
sudo yum --enablerepo=remi-php73 install php |
Result:
Check the PHP version:
1 |
php -v |