Manage PostgreSQL with phpPgAdmin on Ubuntu 16.04 | 17.10 | 18.04

To manage MysQL or MariaDB database servers via your web browser, you’ll need phpMyAdmin or similar tool.. For PostgreSQL database, there’s a phpPgAdmin tool – similar in function to phpMyAdmin… which allows you to connect to PostgreSQL database server via a web browser to manage it…

This brief tutorial is going to show students and new users how to install PostgreSQL database server along with phpPgAdmin tool to manage PostgreSQL…

In our previous post, we said PostgreSQL was a general purpose and object-relational database management system, probably the most advanced open source database system…. you can also add custom functions using different programming languages such as C/C++, Java, etc…

To get PostgreSQL install and managed with phpPgAdmin, follow the steps below:

Step 1: Install PostgreSQL on Ubuntu

Since we’ve already discussed and written about PostgreSQL, we will reference our previous post on installing PostgreSQL… Instead of writing a new tutorial for PotgreSQL, just follow the link below to learn how to install PostgreSQL server on Ubuntu….

Installing PostgreSQL 10 on Ubuntu 16.04 / 17.10 / 18.04

Step 2: Install and Configure phpPgAdmin

Now that PostgreSQL is installed, run the commands below to install phpPgAdmin management tool…

sudo apt install phppgadmin

In our previous post installing PostgreSQL, you should have created set a posgre user credentials… those are the credentials you’ll need to logon using phpPgAdmin web portal… Before you can logon, run the commands below to conofigure Apache2… to allow connections from remote systems…

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

Then change the line below to Require all granted

# Only allow connections from localhost:
#Require local
Require all granted

Save the file and exit.

Next, open phpPgAdmin config file make the highlighted changes below…

sudo nano /etc/phppgadmin/config.inc.php

Then change the line below to false…

// understand how to change PostgreSQL's pg_hba.conf to enable
// passworded local connections.
$conf['extra_login_security'] = false;

Save and exit.

Restart Apache2 and PostgreSQL…

sudo systemctl restart apache2.service
sudo systemctl restart postgresql.service

After that, opne your browser and type the hostname followed by /phppgadmin/
http://localhost/phppgadmin

You should see phpPgAdmin logo page to logon…  use postgres user account to logon

If you’re having password issues, run the commands below to reset the postgre account password…

su - postgres
psql
\password postgres
\q

Postgres ubuntu

You may also like the post below:

Install Croogo CMS on Ubuntu 16.04 / 17.10 / 18.04 with Apache2, MariaDB and PHP 7.2 Support

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.