Linux – How to install PHPMyAdmin on Linux EC2 instance

amazon ec2linuxphpmyadmin

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?

Best Answer

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 https://files.phpmyadmin.net/phpMyAdmin/4.5.0.2/phpMyAdmin-4.5.0.2-all-languages.tar.bz2
    
  4. Unzip

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

    mv phpMyAdmin-4.5.0.2-all-languages phpmyadmin
    
  6. Remove the zip file

    rm -rf phpMyAdmin-4.5.0.2-all-languages.tar.bz2
    

That's the basics. You can find more info in the link provided above.