Most Linux distributions come with PhpMyAdmin preinstalled and ready to configure. However, this is not true of Red Hat distributions such as CentOS, Fedora, or Amazon AMI among others. For these distributions, phpMyAdmin is located in the Extra Packages for Enterprise Linux (or EPEL) repository. EPEL is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS, Scientific Linux (SL), and Oracle Linux (OL).
Installing PhpMyAdmin is not difficult and requires just a few minutes. These instructions apply to performing the installation from an OSX Yosemite machine.
- Open Terminal from the Applications/Utilities folder
- Open a New Remote Connection (⇧⌘K) and log into your AWS AMI instance and execute the following commands:
sudo yum update sudo yum --enablerepo=epel install phpmyadmin sudo vi /etc/httpd/conf.d/phpMyAdmin.conf
- Edit /etc/httpd/conf.d/phpMyAdmin.conf to look like this:
# phpMyAdmin - Web based MySQL browser written in php # # Allows only localhost by default # # But allowing phpMyAdmin to anyone other than localhost should be considered # dangerous unless properly secured by SSL Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin Alias /mysqladmin /usr/share/phpmyadmin
AddDefaultCharset UTF-8 Options All AllowOverride All Require all granted # Apache 2.4 Require ip 127.0.0.1 Require ip ::1 # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 Options All AllowOverride All Require all granted
- Edit the “blowfish secret" in /etc/phpMyAdmin/config.inc.php. Change string from default:
/* * This is needed for cookie based authentication to encrypt password in * cookie */ $cfg['blowfish_secret'] = '4875149021800013670'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
- Log into phpMyAdmin and test your installation