How to install php7 and Centosyum on Centos through yum

Source: Internet
Author: User

How to install php7 and Centosyum on Centos through yum

  1.  
  2. Run the following command to install epel:

    Yum-y install epel-release

  3.  

    Replace the rpm source. select an appropriate rpm source based on your centos version for installation.

    Centos 5.X:

    Rpm-Uvh http://mirror.webtatic.com/yum/el5/latest.rpmCentOs 6.x:

    Rpm-Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

    CentOs 7.X:

    Rpm-Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm

    Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

  4.  

    Delete previous php versions

    Yum remove php * php-common

  5.  

    Install php7yum install php70w

  6.  

    View the php version after installation, as shown in:

    Php-v

  7.  

    Restart the apache service and reload php7.

    Service httpd restart

  8.  

    Finally, write a php probe to check the php information as shown in. The Code is as follows:

    <? Php phpinfo ();?>

  9.  

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.