Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in RHEL/CentOS 7.0

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.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

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

31 Responses

  1. Tolga says:

    Thank you very much for your informative article on LAMP setup..

  2. Martin Skorvald says:

    Hi
    One more thing to note:

    rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
    [[email protected] yum-root-bB6l9i]# pwd
    /var/tmp/yum-root-bB6l9i

    //marsk

  3. felix says:

    Dear friend, I have installed CentOS 7.0 as I can know until version of php supports. felix

  4. Dida Arda says:

    Typo ‘LocationMach’ please change ‘LocationMatch’
    and ‘nano /etc/httpd/conf.d/phpmyadmin.conf’ change to ‘nano /etc/httpd/conf.d/phpMyAdmin.conf’

    New Version

  5. James Aker says:

    you can add phpmyadmin for Centos 7:
    sudo yum install epel-release
    sudo yum install phpmyadmin

  6. ella says:

    Can not install phpmyadmin on OEL 7.2 x64….

    wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
    rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
    =>package rpmforge-release-0.5.3-1.el7.rf.x86_64 is already installed
    Error: Package: phpmyadmin-2.11.11.3-2.el6.rf.noarch (rpmforge)
    Requires: php-mbstring >= 4.1.0

  7. ketil ervik says:

    Dont work! bad howto

  8. lester says:

    Your instructions throws erros at:

    # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

    and your image associated with that command also shows the error. Can’t get past this part.

    • Ravi Saive says:

      @Lester,
      Do this way…

      # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
      # rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
      
    • Kyoungrae says:

      It’s really late to answer this but I think I would let you know.

      # yum install http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

      You can get past right this way.

  9. Matei Cezar says:

    @sahadev: Check /etc/httpd/conf.d/phpmyadmin.conf file and verify your IP/netmask
    ##############

    Order Deny,Allow
    Deny from all
    Allow from 10.0.0.0/24 ## Use your IP/Network CDIR
    Require all granted

    • Israrul Haque says:

      I tried to restrict phpmyadmin access to a particular ip address in httpd-2.4 but still it is not working

      • Ravi Saive says:

        @Israrul,

        How to configure PhpMyAdmin to allow access to specific IP address.

        Open /etc/httpd/conf.d/phpMyAdmin.conf file and edit Require ip& Allow from lines as shown in the following example.

        Here is what phpMyAdmin.conf will look like with the added access rules.

        <Directory /usr/share/phpMyAdmin/>
        
        <IfModule mod_authz_core.c>
        # Apache 2.4
        <RequireAny>
        Require ip 127.0.0.1
        Require ip ::1
        # Example office IP
        Require ip 192.168.0.100
        </RequireAny>
        
        </IfModule>
        <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order Deny,Allow
        Deny from All
        Allow from 127.0.0.1
        Allow from ::1
        # Example home IP
        Allow from 192.168.0.100
        </IfModule>
        
        </Directory>
        <Directory /usr/share/phpMyAdmin/setup/>
        <IfModule mod_authz_core.c>
        # Apache 2.4
        <RequireAny>
        Require ip 127.0.0.1
        Require ip ::1
        # Example home IP
        Require ip 192.168.0.100
        </RequireAny>
        
        </IfModule>
        <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order Deny,Allow
        Deny from All
        Allow from 127.0.0.1
        Allow from ::1
        # Example home IP
        Allow from 192.168.0.100
        </IfModule>
        </Directory>
        

Leave a Reply to Tolga Cancel reply

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.