amazon ec2 - How to install PHPMyAdmin on Linux EC2 instance?
2013-08
I just finished setting up a default Linux EC2 instance and would like to install PHPMyAdmin. I already have Apache and MySQL installed but cannot seem to install PHPMyAdmin. I tried using
sudo apt-get phpmyadmin
but the command apt-get
is not recognized.
I also tried sudo yum install phpmyadmin
but that I get the message No package phpmyadmin available.
Any suggestions on what I am doing wrong?
I found an easy solution here.
Do the following:
Navigate to the apache folder
cd /var/www/html
Ensure ownership of the folder (assuming signed in with ec2-user)
sudo chown ec2-user .
Download phpMyAdmin
wget http://www.sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.0.3/phpMyAdmin-4.0.3-all-languages.tar.bz2
Unzip
tar -jxf phpMyAdmin-4.0.3-all-languages.tar.bz2 -C /var/www/html
Rename the folder
mv phpMyAdmin-4.0.3-all-languages phpmyadmin
Remove the zip file
rm -rf phpMyAdmin-4.0.3-all-languages.tar.bz2
That's the basics. You can find more info in the link provided above.
I know the question has more than one year, but was the first thing that popped up on google with "phpmyadmin ec2". Here is a better way to do things.
Knowing that you have yum, the best way to act is to install it by yum, being a RHEL distribution you can "activate" the EPEL repository ( Extra Packages for Enterprise Linux), where you can find phpmyadmin and some other stuff.
Here you can see a package list for the EPEL repo.
There is 2 way to use EPEL, one is to activate it permanently, editing the file /etc/yum.repos.d/epel.repo
and where it says enabled=0
we change it to enabled=1
, now you can sudo yum install phpmyadmin
.
The easy way is to activate it just to install the packages you want, like mongodb or phpmyadmin.
sudo yum --enablerepo=epel install phpmyadmin
and it should work.
First add the repository, then install:
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
sudo yum install phpmyadmin
This works fine on a standart 32bits amazon instance
As of 13th December 2012, this works fine on an EC2 server:
sudo apt-get install phpmyadmin
No other steps necessary, assuming you have PHP, MySQL and Apache all set up.
The package is called phpMyAdmin
. You may need to enable EPEL first.
sudo apt-get install phpmyadmin
once you have installed it, you must make a symbolic link (like a redirect) using
sudo ln -s /usr/share/phpmyadmin /var/www
to open (change your IP) http://XXX.XXX.XXX.XXX/phpmyadmin
you MIGHT see an error missing mcrypt. i couldnt solve, but it didnt get in the way.
for logging in user is "root" and the password is the one that you created during the phpmyadmin install
adapted from this tutorial
I have just installed phpMyAdmin on my Ubuntu (using sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin). I think installation went OK. So, how can I start the phpMyAdmin now?
I tried http://localhost/phpMyAdmin/index.php
I also tried http://localhost/phpmyadmin/scripts/setup.php
Both do not work.
I also need to add that I have installed Apache, PHP and MySQL. Everything works fine.
You need to update the file phpMyAdmin.conf to something like this:
<Directory /usr/share/phpMyAdmin/>
order deny,allow
#deny from all
allow from all
</Directory>
or allow from <your IP address>
if you intend to host this server.
In ubuntu by default, phpmyadmin is installed in /usr/share/phpmyadmin
Setting a symbolic link should help you. The command would be as follows :
$ ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
After this, open http://localhost/phpmyadmin
in browser and it should work (given that your Apache settings permit this)
Have you tried http://localhost/phpmyadmin/ ?