Project

General

Profile

Support #493

Installing phpMyAdmin and nginx on Debian 7

Added by Daniel Curtis about 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database Server
Target version:
Start date:
12/15/2014
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

With our LEMP platform already in place, we can begin right away with installing the phpMyAdmin software. This is available within Ubuntu's default repositories, so the installation process is simple.

  • First, update the server's local package index to make sure it has a fresh set of references to available packages. Then, we can use the apt packaging tools to pull the software down from the repositories and install it on our system:
    sudo apt-get update
    sudo apt-get install nginx php5-fpm phpmyadmin
    

During the installation, you will be prompted for some information. It will ask you which web server you would like the software to automatically configure. Since Nginx, the web server we are using, is not one of the available options, you can just hit TAB to bypass this prompt.

The next prompt will ask if you would like dbconfig-common to configure a database for phpmyadmin to use. Select "Yes" to continue.

You will need to enter the database administrative password that you configured during the MySQL installation to allow these changes. Afterward, you will be asked to select and confirm a password for a new database that will hold phpMyAdmin's own data.

  • The installation will now complete. Now create a file to enable phpmyadmin:
    nano /etc/nginx/sites-enabled/phpmyadmin
    
    • And add the following:
      server {
          listen          8080;
          server_name     localhost;
          root        /usr/share/phpmyadmin;
          client_max_body_size 1024M;
          index       index.php index.html index.htm;
          if (!-e $request_filename) {
              rewrite ^/(.+)$ /index.php?url=$1 last;
              break;
          }
          location ~ .php$ {
              try_files $uri =404;
              fastcgi_pass unix:/var/run/php5-fpm.sock;
              fastcgi_index index.php;
              include /etc/nginx/fastcgi_params;
          }
      }
      
  • A final item that we need to address is enabling the mcrypt PHP module, which phpMyAdmin relies on. This was installed with phpMyAdmin so we just need to toggle it on and restart our PHP processor:
    sudo php5enmod mcrypt
    sudo service php5-fpm restart
    

With that, our phpMyAdmin installation is now operational. To access the interface, go to your server's domain name or public IP address followed by /phpmyadmin, in your web browser:
http://server_domain_or_IP/phpmyadmin

Resources

#1

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
  • Status changed from New to Resolved
  • % Done changed from 0 to 100
#2

Updated by Daniel Curtis almost 10 years ago

  • Status changed from Resolved to Closed
#3

Updated by Daniel Curtis over 9 years ago

  • Description updated (diff)
#4

Updated by Daniel Curtis over 9 years ago

  • Description updated (diff)
  • Category set to Database Server
  • Target version set to Debian

Also available in: Atom PDF