23 September 2014

Install phpMyAdmin for Apache on Arch Linux so that it would open under "pma.localhost". This works on other distributions as well just use your specific package manager to download the packages and the configuration files paths may vary.

Install necessary packages

Install the phpmyadmin and php-mcrypt packages from the official repositories.
Source code viewer
  1. yaourt -S php-mcrypt phpmyadmin
Programming Language: Bash

Create phpmyadmin conf file for mysql

Source code viewer
  1. vim /etc/httpd/conf/extra/httpd-phpmyadmin.conf
Programming Language: Bash
Source code viewer
  1. <VirtualHost pma.localhost:80>
  2. ServerAdmin phpmyadmin@apache.com
  3. DocumentRoot "/usr/share/webapps/phpMyAdmin"
  4. ServerName pma.localhost
  5. ServerAlias pma.localhost
  6. ErrorLog "/var/log/httpd/pma.localhost-error_log"
  7.  
  8. <Directory "/usr/share/webapps/phpMyAdmin">
  9. DirectoryIndex index.html index.php
  10. AllowOverride All
  11. Options FollowSymlinks
  12. Require all granted
  13. </Directory>
  14. </VirtualHost>
Programming Language: Apache configuration

Add reference to the conf file to Apache conf

Source code viewer
  1. vim /etc/httpd/conf/httpd.conf
Programming Language: Bash
Source code viewer
  1. # phpMyAdmin configuration
  2. Include conf/extra/httpd-phpmyadmin.conf
Programming Language: INI
For further information: Official wiki page about PHPMyAdmin.