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:Execute commands on remote serverShell123sudo yum updatesudo yum --enablerepo=epel install phpmyadminsudo vi /etc/httpd/conf.d/phpMyAdmin.conf
- Edit /etc/httpd/conf.d/phpMyAdmin.conf to look like this:/etc/httpd/conf.d/phpMyAdmin.conf12345678911121314151718192021222324252627282930313233343537# 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 SSLAlias /phpMyAdmin /usr/share/phpMyAdminAlias /phpmyadmin /usr/share/phpMyAdmin<Directory /usr/share/phpMyAdmin/>AddDefaultCharset UTF-8Options AllAllowOverride All<IfModule mod_authz_core.c># Apache 2.4<RequireAny>Require ip 127.0.0.1Require ip ::1</RequireAny></IfModule><IfModule !mod_authz_core.c># Apache 2.2Order Deny,AllowDeny from AllAllow from 127.0.0.1Allow from ::1</IfModule></Directory><Directory /usr/share/phpMyAdmin/setup/>Options AllAllowOverride All<IfModule mod_authz_core.c>
- Edit the “blowfish secret" in /etc/phpMyAdmin/config.inc.php. Change string from default:/etc/phpMyAdmin/config.inc.phpPHP12345/** 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