Install phpPgAdmin on CentOS & RHEL
phpPgAdmin is web-based client written in php for accessing and managing PostgreSQL databases, it is very similar in look of phpMyAdmin. phpPgAdmin will let you add, remove and manage databases, tables, and entries; run specific SQL queries, backup the database, search and import record, and much more. If you have a work experience on phpMyAdmin, you wont take much time in finding the way to work with.
See Also:
This article will help you to install phpPgAdmin on CentOS and RedHat Systems.
Step #1 Add PostgreSQL Repository
First install postgres repository in your system, use following command to install repository:
For CentOS/RHEL 7 # rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm For CentOS/RHEL 6 64 Bit # rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-redhat95-9.5-2.noarch.rpm For CentOS/RHEL 5 64 bit # rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-5-x86_64/pgdg-redhat95-9.5-2.noarch.rpm For CentOS/RHEL 6 32 Bit # rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-6-i386/pgdg-centos95-9.5-2.noarch.rpm For CentOS/RHEL 5 32 bit # rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-5-i386/pgdg-centos95-9.5-2.noarch.rpm
Step #2 Install phpPgAdmin
Install phpPgAdmin using yum following command.
# yum install phpPgAdmin
Step #3 Configure phpPgAdmin
By default you can access phpPgAdmin from localhost only. If you want to make it accessible from remote computers also then edit phpPgAdmin configuration and update like below.
# vim /etc/httpd/conf.d/phpPgAdmin.conf
Alias /phpPgAdmin /usr/share/phpPgAdmin <Directory /usr/share/phpPgAdmin> order allow,deny deny from all allow from 192.168.102.0/24 Require all granted </Directory> <Location /phpPgAdmin> <IfModule mod_authz_core.c> # Apache 2.4 Require local Require all granted </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order allow,deny deny from all Allow from 192.168.102.0/24 Allow from ::1 Require all granted </IfModule> </Location> </pre>
Step #4 Restart Apache Service
Restart Apache service to reload new settings.
For CentOS/RHEL 7 # systemctl restart httpd For CentOS/RHEL 6/5 # service httpd restart
Step #5 Access phpPgAdmin
Now you can access phpPgAdmin in browser using following url.
http://192.168.102.226/phpPgAdmin/
Enjoy it!