How to set up Adminer on Ubuntu with Apache

Adminer is a great, simple tool to access and edit databases through a browser. To use it, you need a web server with PHP. In this tutorial we will explain how to install it with Apache.

Connect to your server:

$ ssh root@server-address.com

Create a webroot for the adminer installation:

$ mkdir /usr/share/adminer

Download the latest version of adminer to the webroot:

$ wget "http://www.adminer.org/latest.php" -O /usr/share/adminer/latest.php

Rename it to adminer.php:

$ mv /usr/share/adminer/latest.php /usr/share/adminer/adminer.php

And now it’s time to create a really simple config file for apache to serve adminer:

$ echo "Alias /adminer.php /usr/share/adminer/adminer.php" > /etc/apache2/conf-available/adminer.conf

Enable the configuration, and reload apache to apply it:

$ a2enconf adminer.conf
$ systemctl reload apache2

Now you can find it by browsing /adminer.php on your server!

http://server-address.com/adminer.php

Leave a Reply

Your email address will not be published. Required fields are marked *