Get latest version
wget https://files.phpmyadmin.net/phpMyAdmin/4.4.14/phpMyAdmin-4.4.14-all-languages.zip
Unzip in /var/www/pma
Create config file
cp config.sample.inc.php config.inc.php
Create phpmyadmin db
mysql < create_tables.sql
Create user
mysql -e "GRANT SELECT, INSERT, DELETE, UPDATE ON phpmyadmin.* TO 'pmaadmin'@'%' IDENTIFIED BY '<PASS>'"
Enable parts related to the db, username and pw from above
vim config.inc.php
Create configuration file (copy and paste the whole command):
cat > /etc/httpd/conf.d/phpMyAdmin.conf <<EOF Alias /phpMyAdmin /var/www/html/pma Alias /phpmyadmin /var/www/html/pma <Directory /var/www/html/pma/> AuthType Basic AuthName "Restricted" AuthUserFile /etc/phpMyAdmin/.htpasswd Require valid-user </Directory> EOF
Create auth file
htpasswd -c /etc/phpMyAdmin/.htpasswd admin (FYI 'admin' it's the username)
To ADD users, just remove the -c flag