Install Adminer on Ubuntu 18.04 bionic

karim picture karim · Sep 24, 2018 · Viewed 10.1k times · Source

I'm trying to install Adminer from Ubuntu repository using:

sudo apt install adminer

Installation works fine but can't find the file /etc/adminer/apache.conf to use with Apache server. The folder /etc/adminer/ is empty and can't find it anywhere with find command.

Any help? Thanks in advance.

Answer

Dominik K picture Dominik K · Oct 19, 2018

In the next few steps, I'll show you how I installed adminer for Ubuntu 18.04.1 LTS .

  1. After installation with apt package manager change into the adminer directory.

    cd /usr/share/adminer
    

    There you will find a file called compile.php.

  2. Run the following command and the adminer-X.X.X.php (X.X.X for your version) file will be created.

    sudo php compile.php
    
  3. Create the apache adminer configuration file.

    sudo echo "Alias /adminer.php /usr/share/adminer/adminer-X.X.X.php" | sudo tee /etc/apache2/conf-available/adminer.conf
    
  4. Now you'll need to activate the configuration.

    cd /etc/apache2/conf-available/
    sudo a2enconf adminer.conf
    
  5. Reload your apache webserver.

    sudo systemctl reload apache2.
    
  6. Test in your browser of choice (localhost/adminer.php)

This source was really helpful:
https://www.linuxhelp.com/how-to-install-adminer-on-ubuntu-16-04/