Install and Configure phpPgAdmin

18 Nov

Install and Configure phpPgAdmin

  • Option 1: Using Yum
    • Note that this install the latest stable version. As of this writing phpPgAdmin 4.x.
    • yum install phpPgAdmin
  • Option 2: Building from source
    • Note that this is required to build a beta package. As of this writing phpPgAdmin 5.x.
    • Download a beta package from
    • Extract the zip file to the document root. For example: /var/www/html/phppgadmin
    • Follow the instructions in the INSTALL file in the extracted directory.
  • Setup a userid/password for phpPgAdmin
    • su – postgres
    • createuser -P pgadmin
    • Enter password for new role: xxxx
    • Enter it again: xxxx
    • Shall the new role be a superuser? (y/n) y
  • Restart Postgres
    • service postgresql-9.0 restart
  • Ensure RewriteRules allow phppgadmin requests. For example, the following Redirect rule matches redirects all request except xhprof, phpmyadmin and phppgadmin to the abc.php.

    RewriteRule !^(/phpmyadmin|/xhprof_html|/phpPgAdmin) /var/www/html/myapp/abc.php

Setup PhpPgAdmin remote access

  • If you want to access phpPgAdmin remotely ensure you set the “Allow from all” entry in /etc/httpd/conf.d/phpPgAdmin.conf

Configure PhpPgAdmin hostname

  • cd /usr/share/phpPgAdmin/conf
  • rm (remove the existing soft link)
  • cp
  • vi and set the $ entry to the server running postgres

Edit open_basedir setting in /etc/php.ini

  • If open_basedir is set in /etc/php.ini add the following to open_basedir
    • open_basedir = /var/www/html:/usr/share/phpPgAdmin/conf:/usr/share/phpPgAdmin

Setup Export/Import tools.

  • If you want to use Export/Import features in phpMyAdmin, run the following command:
  • cp /usr/pgsql-9.0/bin/* /usr/bin

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: