Install Adminer on a CentOS VPS

Adminer is a database management tool published in PHP. It is similar to phpMyAdmin and it is designed to increase protection, consumer experience, efficiency etc.

It is very light and portable and at the same time it is very highly effective. Today I am going to explain you how to set up Adminer on a a Linux system.

PREREQUISITE

  1. A working CentOS server. In this guide I am using CentOS 7
  2. Windows users should download Putty while Mac and Linux users can simply use Terminal
  3. You’ll also need a basic skill to use Putty and to navigate through SSH.
  4. Your server must have necessary software to host a website. In this case are: Apache, PHP5, and MySQL 
  5. About 15 minutes of your time and a cup of tea.

To set up Adminer on your CentOS VPS, you need to log in to your server via SSH and run several commands.
First step you need to do is to create a directory for Adminer and download the Adminer set up. For this you can use the following command:

Create and change the directory to /usr/share/adminer

mkdir /usr/share/adminer && cd /usr/share/adminer

Download the latest version of Adminer

wget http://downloads.sourceforge.net/adminer/adminer-4.2.1.php -O 
index.php

Once Adminer is downloaded, next step is to configure your Apache web server to use adminer. Create and edit the /etc/httpd/conf.d/adminer.conf file with the below command:

nano /etc/httpd/conf.d/adminer.conf

Add the following entries to that file:

Alias /adminer "/usr/share/adminer"
<Directory "/usr/share/adminer">
AllowOverride All
Options FollowSymlinks
Order deny,allow
Deny from all
Allow from 111.222.333.444
<;/Directory>

Note: do not forget to replace 111.222.333.444 with your local IP address because you will not be able to access Adminer using a web browser.

Once done, save the file and close it.

The last step is to restart your Apache web server. To restart your Apache web server you can use the following command:

/etc/init.d/httpd restart

Congratulation, you are ready to use Adminer now.
To access the web interface, Go to your favorite web browser and navigate to:

http://yourdomain.com/adminer
or

http://IP-address/adminer

Please do not forget to replace yourdomain.com with one of your domain names hosted on the same server and IP address.

To log in, you can use your MySQL root user and password, or any other database user and its password.