Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

7 Answers 7

up vote 26 down vote accepted

I found an easy solution here.

Do the following:

  1. Navigate to the apache folder

    cd /var/www/html
    
  2. Ensure ownership of the folder (assuming signed in with ec2-user)

    sudo chown ec2-user .
    
  3. Download phpMyAdmin

    wget http://www.sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.0.3/phpMyAdmin-4.0.3-all-languages.tar.bz2
    
  4. Unzip

    tar -jxf phpMyAdmin-4.0.3-all-languages.tar.bz2 -C /var/www/html
    
  5. Rename the folder

    mv phpMyAdmin-4.0.3-all-languages phpmyadmin
    
  6. 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.

share|improve this answer
    
You can find the latest version of phpMyAdmin here: http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/ –  jchavannes Sep 8 '13 at 0:33
1  
the only additional step I had to take was updating the server host endpoint for my RDS database in /etc/phpMyAdmin/config.inc.php -- changing $cfg['Servers'][$i]['host'] = 'localhost' to $cfg['Servers'][$i]['host'] = 'xxx.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com' –  Damion Hankejh Oct 9 '13 at 17:43
    
After installation, the phpmyadmin page is empty in my mywebsite.com/phpmyadmin. –  bagusflyer Mar 20 at 8:18
add comment

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.

EDIT (comment by @eric-brotto):

It also should be noted that this comes with the advantage of uninstalling via

(sudo) yum erase phpmyadmin

Eric Brotto Jun 8 at 16:22

Note, that this would install phpmyadmin in /usr/share/phpmyadmin. To make it available in your web root, you would have to symlink it thus:

sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
share|improve this answer
    
I tried yum and can't get it to work. EPEL is too difficult. –  David Sep 11 '12 at 16:01
    
What's too difficult? If you don't want to edit the config and want to keep the server as-is, just use sudo yum --enablerepo=epel install whateveryouwant at least on the ec2 machine i'm working (with the amazon base distribution) that works. –  Shemes Sep 13 '12 at 16:14
3  
I don't think it gets any easier than this. The tl;dr? Just copy and pasted yum --enablerepo=epel install phpmyadmin –  Tuanderful Oct 12 '12 at 7:43
1  
There are many answers on the web stating how to use yum to install phpmyadmin. None of them worked for me. This one does. A million up votes be showered unto thy! –  Eric Brotto Jun 8 '13 at 16:18
2  
It also should be noted that this comes with the advantage of uninstalling via yum erase phpmyadmin. –  Eric Brotto Jun 8 '13 at 16:22
add comment

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

share|improve this answer
    
Also working well on 64bit amazon linux. This is may be better for some users then the "accepted" answer as it resolves the dependencies faster then doing a manual install. –  Nir Levy Feb 8 '12 at 15:34
3  
note that you'll need to supplement this install with "ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin" –  Nir Levy Feb 8 '12 at 15:36
add comment

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.

share|improve this answer
    
How can I access it through web browser once installed ? –  Alwin Augustin Jun 28 at 7:21
add comment

The package is called phpMyAdmin. You may need to enable EPEL first.

share|improve this answer
    
Can you provide more clarification? How do I go about enabling EPEL? –  David May 31 '11 at 21:04
    
Did you try reading "How can I use these extra packages?"? –  Ignacio Vazquez-Abrams May 31 '11 at 21:11
    
That looks way too difficult just to install phpMyAdmin. See my answer for a better solution. –  David Jun 2 '11 at 15:07
add comment
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

share|improve this answer
1  
The question specifically says that apt-get is not available. –  Nick F Jun 6 '13 at 15:27
add comment

Note that if, after using any of the above methods to install phpMyAdmin, the phpMyAdmin page is empty in example.com/phpmyadmin, then you probably need to edit httpd.conf to allow overrides in the web directory, e.g.:

sudo nano /etc/httpd/conf/httpd.conf
  1. Find <Directory "/var/www/html">
  2. Replace AllowOverride none with AllowOverride all
  3. Save changes and exit
  4. Restart Apache server

    sudo service httpd restart
    
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.