Install phpPgAdmin for postrgresql on CentOS RHEL Debian Ubuntu

Overview

phpPgAdmin lets you manage postgres databases using a web based management GUI. If you have any experience with phpMyAdmin for MySQL databases you can imagine how phpPgAdmin would work. This post helps you setup phpPgAdmin on your linux box so you can easily manage postgesql databases.

Install phpPgAdmin for postrgresql on CentOS RHEL Debian Ubuntu

On CentOS RHEL

First you need to enable epel repository, please follow the link here to enable epel. Once done install the following packages.

On Debian, Ubuntu

Next you need to edit the phpPgAdmin config file. Open it in an editor of choice.

On CentOS, RHEL

On Debian, Ubuntu

Add the postgres hostname next to conf server parameter on line 18

Edit line 88 and set extra_login_security to false. If extra login security is true, then logins via phpPgAdmin with no password or certain usernames (pgsql, postgres, root, administrator) will be denied.

Also change line 94 and set owned_only to true

Now you need to make some changes to posgresql conf file, open it in an editor of choice

Make the following changes

line 80: change the method from ident to md5

line 82: change the method from ident to md5 also if you have installed phpPgAdmin on a different machine than the one running postgesql itself then allow the ip address of machine running phpPgAdmin to connect to postgresql. I am defining a full range of IP addresses, you can add the IP address of single host instead also eplace the range below with your ip subnet range

line 84: change the method from ident to md5

Lastly you need to allow the ip addresses that are allowed to connect to phpPgAdmin using a web browser.

On CentOS, RHEL

Add the allowed ip range to line 11 as shown below, replace the range below with your ip subnet range

On Debian, Ubuntu

Add the allowed ip range to line 12 as shown below, replace the range below with your ip subnet range

Restart postgresql server

Finally restart apache

On CentOS, RHEL

On Debian, Ubuntu

Open the following URL and login using the credentials

http://domainname-or-ipaddress/phpPgAdmin

phpPgAdmin01 300x176 Install phpPgAdmin for postrgresql on CentOS RHEL Debian Ubuntu