phpPgAdmin on CentOS & RHEL

phpPgAdmin is web-based client written in php for accessing and managing PostgreSQL databases. It provides very efficient way to work with databases on PostgreSQL like, create database, table, alter database, export/import database etc.
This article will help you to install phpPgAdmin on CentOS and RedHat Systems. Before installing it make sure you have Apache and PostgreSQL installed on server. 

Step 1: Add PostgreSQL Repository

Install postgres repository in your system, Download repository rpm using one of below urls. 
CentOS/RHEL 5, 32-Bit:
# wget

CentOS/RHEL 6, 32-Bit:
# wget

CentOS/RHEL 5, 64-Bit:
# wget

CentOS/RHEL 6, 64-Bit:
# wget
Step 2: Install phpPgAdmin using Yum
Install phpPgAdmin package using yum command line tool.
yum install phpPgAdmin httpd
Step 3: Configure phpPgAdmin to Access Remotly.

Note: phpPgAdmin is case sensitive. Use upper and lower cases properly as shown in the above command.
By default, you can access phppgadmin using http://localhost/phpPgAdmin from your local system only. To access remote systems, do the following.
Edit file /etc/httpd/conf.d/phpPgAdmin.conf:
vi /etc/httpd/conf.d/phpPgAdmin.conf 
Alias /phpPgAdmin /usr/share/phpPgAdmin
<Location /phpPgAdmin>
    <IfModule mod_authz_core.c>
        # Apache 2.4
        Require all granted
        #Require host
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
        # Allow from
Step 4: Restart Apache Service
Restart Apache service to reload new settings.
# service httpd restart

Step 5 : Configure phpPgAdmin

Edit file /etc/phpPgAdmin/, and do the following changes. Most of these options are self-explanatory. Read them carefully to know why do you change these values.

vi /etc/phpPgAdmin/
Find the following line:
$conf['servers'][0]['host'] = '';
Change it as shown below:
$conf['servers'][0]['host'] = 'localhost';
And find the line:
$conf['extra_login_security'] = true;
Change the value to false:
$conf['extra_login_security'] = false;
Find the line:
$conf['owned_only'] = false;
Set the value as
$conf['owned_only'] = true;
Save and close the file. Restart postgresql service and Apache services.
On CentOS 6.x systems:
service postgresql-9.5 restart
service httpd restart
On CentOS 7 systems:
systemctl restart postgresql-9.5
systemctl restart httpd
Now open your browser and navigate to http://ip-address/phpPgAdmin

About Author:

I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Newer Post
Older Post


Post a Comment