How to install the PHP 7 environment in CentOS 7

Source: Internet
Author: User
Tags centos zend

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.