Install Apache, MySQL 8 or MariaDB 10 and PHP 7 on CentOS 7

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.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

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...

198 Responses

  1. shufil says:

    Thanks for the article, I have using php 5.6 with apache 2.4, i need to install mysqli extension, i have done with below commands.

    $ cd extname
    $ phpize
    $ ./configure
    $ make
    # make install# its seem installed correctly 

    and also i have added path in php.ini, but still its not install mysqli, php -i | grep mysqli is given mysqli with details, please help me to do correctly .

    • Ravi Saive says:


      Why you compiling from source mysqli extension? just use yum to install it like this.

      # yum install php-mysql
  2. murthy says:

    I am gone through same steps but still apache is in old version… Any idea ???

  3. Purab Kharat says:

    Nice helpful article Ravi. I used your tips for my VPS.


  4. Victor says:

    CentOS 6.7 x86_64 don’t update/install Apache 2.4, any solutions?

    • Ravi Saive says:


      Have you enabled said Remi repository on the system, before trying to install/update Apache? Which version of Apache, you currently have on the system?

  5. Carlos Orlandi says:

    I had some issues when i tried to install Apache, Mysql and PHP using this method but now i guess it’s working.

    I would like to know how i could test my webserver ? I’m not using any GUI at my Red Hat Server. I saw you posting to test using . But how could i do that in my pc? I tried to use the server ip address and i don’t have any success. :(

    Could you help me?

  6. Claudia says:

    hi, when I try to create a phpinfo.php and view it from the browser level, i wasn’t able to see the same page as you.
    Instead I am seeing things like

  1. December 12, 2015

    […] Installing LAMP in RHEL/CentOS 6.0 […]

  2. March 25, 2016

    […] Install LAMP in RHEL/CentOS 6 and Fedora […]

  3. June 2, 2016

    […] Read Also: Install Latest Apache 2.4, MySQL 5.5/MariaDB 10 and PHP 5.5/5.6 on RHEL/CentOS 7/6 & Fedora 20-… […]

  4. September 1, 2016

    […] Install LAMP Stack on RHEL/CentOS 7/6 & Fedora 24-18 […]

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.