HostOnNet Blog

How do I installed phpMyAdmin on Ubuntu 16.04 LTS using Source Archive

Following is the steps that I have used to install phpMyAdmin on localhost

Download phpMyAdmin Archive

	cd /home/sibi/www
	mv phpMyAdmin-4.8.1-all-languages phpmyadmin

Then I run the commands below to set the correct permissions for phpMyAdmin to function.

sudo chown -R www-data:www-data /home/sibi/www/phpmyadmin
sudo chmod -R 755 /home/sibi/www/phpmyadmin

When I used above command, phpmyadmin folder displayed with a lock icon

So I tried the below and it worked

sudo chmod 777 -R /home/sibi/www/phpmyadmin

Apache configuration for phpMyAdmin

Created a new Apache configuration file for phpMyAdmin

touch /etc/apache2/conf-available/phpmyadmin.conf	

Open phpmyadmin.conf file in Sublime Text Editor

subl /etc/apache2/conf-available/phpmyadmin.conf

Then added the following in phpmyadmin.conf

	<Directory "/home/sibi/www/phpmyadmin">
	Order Deny,Allow
	Deny from all
	Allow from localhost
	Allow from
	Allow from

	Alias /phpmyadmin /home/sibi/www/phpmyadmin
	Alias /phpMyAdmin /home/sibi/www/phpmyadmin

Restarted Apache Service

	sudo service apache2 restart

But when I access http://localhost/phpmyadmin/ showing like the below screenshot


So I uninstalled php

sudo apt-get remove -y --purge php7.0*

and then reinstalled

sudo apt-get install php -y
sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} && sudo apt-get install libapache2-mod-php  -y

Now I can access phpMyAdmin at http://localhost/phpmyadmin/

About Sibi Antony

Bootstrap and Android LOVER. I've been creating things for the web for over 10 years, from the period of flash and table based layout web sites till mobile and tab friendly web sites.
Posted in PHP