Install Adminer manually on Ubuntu 14.04

adminerAs I wrote over two years ago, Adminer is a very good alternative to PHPMyAdmin. I often find myself looking up that old post, because I frequently install, recommend or update Adminer. After using this software for several years, I am now convinced that it is (has become) much better than PHPMyAdmin. Especially since the new user interface of PHPMyAdmin has become worse. Adminer has progressed a lot and is at version 4.1.0 today. I simply love version 4 and I use it almost daily. The top 3 reasons (for me) to choose it are:
  1. Very clear and consistent user interface
  2. It automatically adds foreign keys
  3. You can easily reorder columns in a table

I think that once you give it a (serious) try, you will never want to use PHPMyAdmin (or any other database management tool) again… ever.

Install Adminer from the repository

It is also great that Adminer is now part of the standard Ubuntu repositories. This means that you can install it with “sudo apt-get install adminer”. However, I do not recommend this. The version of Adminer in the repository is version 3.3.3-1. And it is a very active project with great improvements in every version. Also, upgrading does not hurt, since it handles its dependencies very flexible. In my experience you can run the latest version on any recent Linux without any compatibility issues.

Install Adminer manually

Here are the commands you need for installation (on a Debian based system) that runs Apache 2.4, like Ubuntu 14.04:

sudo mkdir /usr/share/adminer
sudo wget "" -O /usr/share/adminer/latest.php
sudo ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php
echo "Alias /adminer.php /usr/share/adminer/adminer.php" | sudo tee /etc/apache2/conf-available/adminer.conf
sudo a2enconf adminer.conf
sudo service apache2 restart

Updating and uninstalling

This is the one-liner for updating Adminer:

sudo wget "" -O /usr/share/adminer/latest.php

And these are the commands needed for uninstallation:

sudo a2disconf adminer.conf
sudo service apache2 restart
sudo rm /etc/apache2/conf-available/adminer.conf
sudo rm -Rf /usr/share/adminer

If you know of any tool that is as good as Adminer, then let us know in the comments.


10 tools for PHP developers in Ubuntu 14.04

To convert your Ubuntu 14.04 into a powerhouse for software development for PHP, you need to install some developer tools from the rich set of available software packages. I have made a top 10 of my favorite developer tools.

1) Install Eclipse 3.8 as a complete IDE

Altough everybody I know prefers the JetBrains IDE’s, I am still a sucker for free (as in speech) software. I think Eclipse and the various distributions of Eclipse you can download are just as good, when properly configured.

sudo apt-get install eclipse

2) Install Geany 1.23 as a lightweight IDE

I also often find myself using a lightweight IDE. After using way too much “gedit” I have recently (re)discovered “Geany” and I feel it is perfect. With the following commands you install it with a good set of plugins.

sudo apt-get install geany geany-plugins

You can find some Geany color schemes on Github that are worth installing as well.

tar -xvf geany-themes-1.22.2.tar.bz2
mkdir -p ~/.config/geany/colorschemes/
cp geany-themes-1.22.2/colorschemes/* ~/.config/geany/colorschemes/
rm -Rf geany-themes-1.22.2 geany-themes-1.22.2.tar.bz2

3) Install MariaDB 5.5

MariaDB is the replacement for MySQL now that Oracle has acquired it. This is comparable to the replacement of OpenOffice with LibreOffice after Oracle got their hands on it.

sudo apt-get install mariadb-server

4) Install PostgreSQL 9.3

PostgreSQL may be the most powerful database around.

With PostgreSQL 9.2, query results can be returned as JSON data types. Combined with the new PL/V8 Javascript and PL/Coffee database programming extensions, and the optional HStore key-value store, users can now utilize PostgreSQL like a “NoSQL” document database, while retaining PostgreSQL’s reliability, flexibility and performance. (source)

I feel you should always consider using it before choosing any “NoSQL” or “documents-based” database.

sudo apt-get install postgresql pgadmin3

Do not forget to set the root (postgres) password.

sudo -u postgres psql postgres
ALTER USER postgres WITH PASSWORD '<password>';

5) Install Apache 2.4 + PHP 5.5 + modules

Install Apache and the default method (mod_php) to serve the new PHP 5.5.

sudo apt-get install apache2 libapache2-mod-php5

Install PHP 5 support for MariaDB and PostgreSQL.

sudo apt-get install php5-mysql php5-pgsql

Some PHP packages for Symfony development.

sudo apt-get install php5-intl php5-sqlite

PHP packages for cURL and XDebug.

sudo apt-get install php5-curl php5-xdebug

Optional PHP packages for creating images (GD), doing geolocalization on IP address (GeoIP), encryption and Redis/Memcache caches.

sudo apt-get install php5-gd php5-geoip php5-mcrypt php5-redis php5-memcache php5-memcached

Now enable mod_rewrite and restart Apache to make sure everything is loaded.

sudo a2enmod rewrite
sudo service apache2 restart

6) Install Adminer 4

PhpMyAdmin is a very popular web-based database management tool. Adminer is a drop in replacement that beats it on almost all points. You can install the latest version of Adminer using:

sudo mkdir /usr/share/adminer
sudo wget -O /usr/share/adminer/latest.php ""
sudo ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php
echo "Alias /adminer.php /usr/share/adminer/adminer.php" | sudo tee /etc/apache2/conf-available/adminer.conf
sudo a2enconf adminer
sudo service apache2 reload

Now go here to run it: http://localhost/adminer.php

In the future you can easily update Adminer using:

sudo wget -O /usr/share/adminer/latest.php ""

7) Install Git

Install the Git source code versioning system:

sudo apt-get install git

Check out this great Git cheat sheet.

8) Install some compilers and build tools

With the following commands you get most common compilers and build tools.

sudo apt-get install gcc build-essential libc6-dev autoconf automake

9) Install the Microsoft fonts

There are always people that rely on the standard Microsoft fonts (like Arial). Although this is bad practice and HTML5 allows you to embed fonts, still it may solve some problems to just install these:

sudo apt-get install ttf-mscorefonts-installer

10) Upgrade your Office experience

A developer also needs to read or write some documentation or specifications. Libreoffice Writer is IMHO better than the real thing (Microsoft Word).

sudo apt-get purge gnumeric abiword
sudo apt-get install libreoffice


Did we miss some really important package? Let us know in the comments.


Adminer: good alternative for phpMyAdmin

NB: This is an outdated post. New Ubuntu versions use Apache 2.4 instead of Apache 2.2. You can find updated instructions that apply to Ubuntu 14.04 in a new post!

It is not a secret that do a lot of Symfony programming at LeaseWeb. Most of the projects are PHP based and use MySQL as a database. This posts describes a gem that many experienced PHP programmers have not yet heard of.

During software development you often need a tool to quickly search the database, add a column or change a value. Most PHP developers know that phpMyAdmin is a good tool that can provide you with easy access, but only a few know that there is really good alternative for this tool called “Adminer“.

In my opinion Adminer has the advantage that it has a better user experience, but this is not the only advantage it has (or may have). According to the Adminer website there is a long list of reasons why Adminer is better than phpMyAdmin.

If you are really fond of Adminer, you might want to install it in the same way phpMyAdmin is installed. Since it is not yet part of the standard Ubuntu repositories you might want to install it manually. Here are the commands you need for installation (on a Debian based system):

$ sudo su
# mkdir /usr/share/adminer
# cd /usr/share/adminer
# wget ""
# ln -s latest.php adminer.php
# echo "Alias /adminer.php /usr/share/adminer/adminer.php" > /etc/apache2/conf.d/adminer.conf
# service apache2 restart
# exit

Once it is installed and you want to update it (it wil indicate when a new version is available):

$ sudo su
# cd /usr/share/adminer
# wget ""
# exit

To uninstall it:

$ sudo su
# rm -R /usr/share/adminer
# rm /etc/apache2/conf.d/adminer.conf
# service apache2 restart
# exit

Try it out and let me know whether you like it or not.