Introduction

phpPgAdmin is a free software tool written in PHP, intended to handle the administration of Postgres database over the Web.
Prerequisite
1. An SSH user with sudo privileges
2. A web server has to be installed

3. Postgres Database with their clients has to be installed
4. A database and its user with a password
Implementation
Step 1: Log in to the server via SSH

$ ssh username@IP

Step 2: Download the phpPgAdmin from the below link it will download to our local
Link: https://sourceforge.net/projects/phppgadmin/

Step 3: Move the tar file which we downloaded in step 2 to the remote server document root

$ scp /path of the downloaded file/ username@IP:/path where we need to place the file/

Step 4: Extract the download file

To extract the tar.gz format file
$ gunzip phpPgAdmin-*.tar.gz
$ tar -xvf phpPgAdmin-*.tar

To extract the tar.bz2 format file
$ bunzip2 phpPgAdmin-*.tar.bz2$ tar -xvf phpPgAdmin-*.tar

To extract a zip format file
$unzip phpPgAdmin-*.zip

Step 5: Configure Postgres to listen to the local host. If we require to listen to the remote IP, replace the local host with the remote IP

$ vi /etc/postgresql/<version>/main/pg_hba.conf

======

Add the below line in the location # IPv4 local connections #

host all all 127.0.0.1/32 md5

======

Step 6: To enable PostgreSQL user, we need to update phpPgAdmin/conf/config.inc.php in the document root with the below settings

$conf[‘extra_login_security’] = false;


Step 7: Restart Postgres service

$ service postgresql restart

Step 8: Access the phpPgAdmin in the browser http://<IP>/phpPgAdmin

Leave a Reply