How to Install PHP 7 in CentOS 6

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

9 Responses

  1. Cedric says:

    Not working for me.
    [[email protected] ~]# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

    Loaded plugins: fastestmirror, replace
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base:
     * epel:
     * extras:
     * ius:
     * remi-php72:
     * remi-safe:
     * updates:

    Any ideas ?

    • Ravi Saive says:


      Please remove ius third party remove before enabling EPEL and Remi repository. Having multiple repositories conflict with each other..

  2. francisco says:

    Thanks brother, I’ve updated my PHP, but got a problem with ionloader but i resolve it my self. can you help me with this error?

    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/’ – /usr/lib64/php/modules/ undefined symbol: sqlite3_column_table_name in Unknown on line 0

  3. R Raut says:


    I have installed Apache 2.4 on CentOS 6.10 with PHP7. Welcome Apache page is showing Red Hat Enterprise Linux Test Page instead CentOS page.

    Is this normal?

  4. Marcos says:

    Thanks for tutorial, but I faced problems, after:

    # yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo 

    I get:

    No package php available.
    No package php-mcrypt available.
    No package php-cli available.
    No package php-gd available.
    No package php-curl available.
    No package php-mysql available.
    No package php-ldap available.
    No package php-zip available.
    No package php-fileinfo available.
    Error: Nothing to do

    help please! :-D

  5. Chris Lawson says:

    If you have some other version of PHP, like say 5.6 installed from the webtatic repo, do you have to remove it before installing the 7.x collection?

    • Aaron Kili says:


      For purposes of consistency, you need to install PHP packages from the same repository. I guess it would be right to remove an old version from a different repo, before installing 7.x from Remi repository.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.