Skip to content

Instantly share code, notes, and snippets.

@janikvonrotz
Last active March 28, 2023 02:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janikvonrotz/9392925 to your computer and use it in GitHub Desktop.
Save janikvonrotz/9392925 to your computer and use it in GitHub Desktop.
Ubuntu: Install phpMyAdmin website #phpMyAdmin #Markdown

Requirements

  • Ubuntu server
  • Nginx
  • Nginx minimal website
  • php5-fpm
  • php5-mysql, php5-mcrypt
  • Nginx php5-fpm website
  • MySQL

Installation

Start the installation phpMyAdmin.

sudo apt-get install phpmyadmin

As we use nginx for this installation, hit Tab and Enter on the first prompt.

Chose and enter the MySQL root password on the second prompt.

Create a secure password for phpMyAdmin. Don't use the MySQL root password!

Add the phpMyAdmin Nginx configuration to one of your websites.

server{
    ...
    
    root /usr/share;

    ...

    location ~ .php$ {
        
        ...
        
        # change the php root for phpMyAdmin
        if ($request_uri ~* /phpmyadmin) {
            set $php_root /usr/share;
        }
        
        ...
    }
}

Test config and reload Nginx service.

sudo nginx -t && sudo service nginx reload

Open your browser on //[host]/phpmyadmin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment