How to install Adminer on Ubuntu 20.04 LTS

How do I install Adminer on Ubuntu 20.04 LTS for database management over the web?

Adminer (formerly known as phpMinAdmin) is an open-source and free web-based database management tool. It is written in PHP. As compared to phpMyAdmin, it is a lightweight application with strong security and user experience in mind. This tutorial describes how to install Adminer on Ubuntu 20.04 LTS Linux server for MySQL or MariaDB.

Procedure to install Adminer on Ubuntu 20.04 Linux server

  1. Update your Ubuntu server running sudo apt update && sudo apt upgrade
  2. Make sure Apache server is installed and configured on Ubuntu
  3. Install Adminer by typing the sudo apt install adminer command.
  4. Enable configuration, run: sudo a2enconf adminer
  5. Log in and start accessing the database using the https://your-domain/adminer/ URL.

Obviously, you need Apache or any other web server installed. Now that the Apache web server is installed and running let us get our hands dirty by installing Adminer.

Installing Adminer

First, update the system using the apt command/apt-get command and then install Adminer software:

sudo apt update  
sudo apt upgrade  
sudo apt install adminer

Configuring Adminer

To activate the adminer app run any one of the following a2enconf commands

sudo a2enconf adminer.conf 
## OR ##  
sudo a2enconf adminer

Outputs:

Enabling conf adminer. To activate the new configuration, you need to run: systemctl reload apache2

Now all you have to do is restart or reload the Apache2 server, enter:
sudo systemctl reload apache2

The default config file is located at /etc/apache2/conf-enabled/adminer.conf and viewed using the cat command.

sudo cat /etc/apache2/conf-enabled/adminer.conf

\# Adminer on Ubuntu 20.04 #
Alias /adminer /etc/adminer
 
<Directory /etc/adminer>
Require all granted
DirectoryIndex conf.php
</Directory>

Test the installation

You can access the Adminer app using the following URL format:

https://your-server-name/adminer/  
https://your-server-ip/adminer/  
https://server1.cyberciti.biz/adminer/

Conclusion

In this tutorial, you learned how to install Adminer on Ubuntu 20.04 LTS Linux server. I strongly suggest that you run Adminer over HTTPS-based session and password protect your domain or /adminer/ URL for security reasons.

See Adminer website here for more info.

Get in touch 👋

Feel free to email me about anything. Want some advice? Give some feedback?

You can also reach me around the web: GitHub, LinkedIn, Twitter, DEV, Facebook, Instagram, CodePen