A few days ago I talked about
Adminer, the best alternative to phpMyAdmin
to manage databases. How could it be otherwise, today we are going to show you
how to install Adminer on Ubuntu, Debian, CentOS and other Linux distributions
.
Being a single file program, the installation is very simple and fast. For this tutorial I will take as a reference an installation of a
LAMP stack environment
by default.
How to install Adminer in Ubutnu, Debian or CentOS.
When we get ready to install Adminer, the first thing that comes to mind is to use the official repositories of our distribution. This is something I do not recommend, since the version that we find may be somewhat outdated and knowing how easy it is to install Adminer is not worth it.
Installing Adminer in Ubuntu.
Starting from Ubuntu, the default path to Apache's public directory is
/var/www/html
, we can continue with the following steps.
First we will create a folder to accommodate the Adminer file, so I will execute the command:
sudo mkdir /var/www/html/adminer
The next step is to
download the most recent version of Adminer
in the folder we created in the previous step, for this we execute:
sudo wget "http://www.adminer.org/latest.php" -O /var/www/html/adminer/adminer.php
When working with sudo, the user and group assigned to the files and folders we have created will be
root
, so we will change it to
www-data
(the default Apache user in Ubuntu)
. For this we execute the command:
sudo chown -R www-data:www-data /var/www/html/adminer
At this point, we can only access Admin from the browser through:
http://[SERVIDOR_IP]/adminer/adminer.php
Installing Adminer on CentOS.
In CentOS 7, the installation process is practically the same as in Ubuntu, except for a couple of details. It may happen that you don't have
wget
installed, but you install it easily with the
sudo yum install wget
command.
In the case of CentOS, the default Apache user is
apache
, so the command would be:
sudo chown -R apache:apache /var/www/html/adminer
How to uninstall Adminer.
If we wanted to
uninstall Adminer from the system
, we would just have to delete its folder with the command:
sudo rm -rf /var/www/html/adminer