Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
sudo yum install https mod_ssl mysql mysql-server php php-mysql php-xml
##Install phpMyAdmin
Get the RPMforge repo (32-bit, for 64-bit use http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm)
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
sudo rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Install
sudo yum install phpmyadmin
##Start MySQL service
cd /etc/rc.d/init.d/
sudo ./mysqld start
sudo /usr/bin/mysql_secure_installation //follow instructions
##Setup startup scripts for apache and MySQL
cd /etc/rc.d/rc3.d
sudo rm K15httpd
sudo rm K36mysqld
sudo ln -s ../init.d/mysqld S30mysql
sudo ln -s ../init.d/httpd S85httpd
##Setup phpMyAdmin
Allow access from external IP's
sudo chmod 0700 /etc/httpd/conf.d/phpmyadmin.conf
sudo nano /etc/httpd/conf.d/phpmyadmin.conf
# Web application to manage MySQL
# #
# Order Deny,Allow
# Deny from all
Allow from 127.0.0.1
#
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
Set blowfish_secret to make it work with cookie auth
sudo chmod 0700 /usr/share/phpmyadmin/config.inc.php
sudo nano /usr/share/phpmyadmin/config.inc.php
...
$cfg['blowfish_secret'] = 'put-a-magic-string-here'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
...
sudo chmod 0755 /usr/share/phpmyadmin/config.inc.php
##Make mod_rewrite (.htaccess) work in subdirectories
cd /etc/httpd/conf
sudo nano httpd.conf
Find <Directory "/var/www/html">
Replace AllowOverride none
with AllowOverride all
(optional if apache is running already, restart it)
sudo service httpd restart
##Start apache
sudo /etc/rc.d/init.d/httpd start
##Sources
Por favor, este tutorial para instalar phpmyadmin não funciona mais com AMI Linux 2015
Please, this tutorial to install phpmyadmin no longer works with Linux AMI 2015
Here the updated tutorial:
1 - Enter in the folder
cd /var/www/html
2 - Download the updated phpMyAdmin
wget https://files.phpmyadmin.net/phpMyAdmin/4.4.13.1/phpMyAdmin-4.4.13.1-all-languages.tar.bz2
3 - Unzip
tar -jxf phpMyAdmin-4.4.13.1-all-languages.tar.bz2 -C /var/www/html
4- Rename the directory by typing:
mv phpMyAdmin-4.4.13.1-all-languages.tar.bz2 phpmyadmin
5 Make a config directory in the phpmyadmin main folder:
cd /var/www/html/phpmyadmin
mv config.sample.inc.php config.inc.php
sudo nano config.inc.php
/* find the code below and past you key - ache o código abaixo e cole sua key *//
$cfg['blowfish_secret'] = ' http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator ' ; /
/*
Exit and save.
Thats it.
http://jafty.com/blog/tag/install-phpmyadmin/