Description

Setting up PHPMyAdmin on RHEL or Centos using the EPEL software repository

Requirements

Explanation of requirements.

  1. Root or Sudo access with root privileges.
  2. Working httpd (Apache) configuration.
  3. Working MySQL or MariaDB configuration.

Doing the Work

Basic description of what will be done and what is expected.

  1. Setup EPEL:
  2. su -c "http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm"

  3. Install phpMyAdmin:
  4. sudo yum install phpMyAdmin
    After the install, you can use: rpm -ql phpMyAdmin to see a list of files and their locations installed during the installation process.

  5. Setup subdomain for your site to access phpMyAdmin:
  6. For this example we’re going to create a virtual host subdomain as: phpadmin.example.com

    We’re using “phpadmin instead of phpMyAdmin to make it easier to type, you can replace “phpadmin” with anything you like and add an SSL certificate for added security.

    1. We’ll need to edit the httpd configuration or edit /etc/httpd/conf.d/phpMyAdmin.conf to add the subdomain in the virtual hosts section at the bottom as follows:
    2. vi /etc/httpd/conf.d/vhosts.conf (this assumes you already have example.com setup and working)

    3. Symlink the phpMyAdmin files to: /var/www/html/phpadmin or use /etc/httpd/conf.d/phpMyAdmin.conf
    4. (note: make sure /var/www/html/phpadmin does not exist before running the symlink command)

      sudo ln -s /usr/share/phpMyAdmin /var/www/html/phpMyAdmin

    5. Restart httpd
    6. C6: service httpd restart
      C7: systemctl restart httpd.service

Troubleshooting

How to test

Explanation troubleshooting basics and expectations.

  1. Let’s go test and make sure we can login:
  2. Open a web browser and navigate to: http://phpadmin.example.com

  3. Make sure httpd and (mysql | mysqld | mariadb) are started, also make sure you have a working MySQL or MariaDB configuration:
  4. C6: service mysqld status; sudo service httpd status
    C7: systemctl status mariadb.service; systemctl status httpd.service

Common problems and fixes

Common problems described here, include links to known common problems if located on another site.

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #centoshelp on irc.freenode.net

Last Modified: 9 Dec, 2015 at 21:20:14