How to run Adminer on Raspberry Pi LAMP server.

Installing Adminer

Create a new directory:

sudo mkdir /usr/share/adminer

Download the latest version of Adminer from official website and place a file in a previously created directory:

sudo wget -O /usr/share/adminer/index.php http://www.adminer.org/latest-en.php

Create Apache configuration file for Adminer:

sudo nano /etc/apache2/conf-available/adminer.conf

Add the following content to a file:

/etc/apache2/conf-available/adminer.conf
Alias /adminer /usr/share/adminer

<Directory /usr/share/adminer>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

Execute the following command to enable Adminer site:

sudo a2enconf adminer.conf

Restart Apache service:

sudo service apache2 restart

Uninstall Adminer

Remove directory where Adminer file is stored:

sudo rm -rf /usr/share/adminer

Disable Adminer site and remove Apache configuration file:

sudo a2disconf adminer.conf
sudo rm -rf /etc/apache2/conf-available/adminer.conf
sudo rm -rf /var/lib/apache2/conf/disabled_by_admin/adminer

Restart Apache service:

sudo service apache2 restart
Source
https://lindevs.com/install-adminer-on-raspberry-pi

Categorized in:

Raspberry Pi,

Last Update: June 27, 2024