Install PHP7 on centos7 using yum. First, run the following command on the terminal:
Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Error message:
Error: Failed dependencies:
Epel-release> = 7 is needed by webtatic-release-7-3.noarch
Install epel-release first.
1. Install epel-release
Run the following command:
Rpm-ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
The installation is successful.
2. Install PHP7
Run the following command again on the terminal:
Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
The yum source of PHP 7 is obtained successfully and then executed:
Yum install php70w
In this way, we are done.
3. Verify installation
Terminal Command: php-v. The Current PHP version is displayed. The information is as follows:
[Root @ iZ94w0kemvtZ/] # php-v
PHP 7.0.2 (cli) (built: Jan 9 2016 14:00:11) (ETS)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
In this way, php7is successfully installed through yum in CentOS 7.