huh, the title quite long isn’t it ?, yeah that’s because there’s a lot of options how to make postgresql working in Mac OSX environment (i’m used Mac OSX 10.5.8), the most common and easy way to install it is via macports, sadly i wasn’t going into that way,because my Apache + PHP installation came from MAMP, not macports, and also my postgresql installation came from EnterpriseDB. yeah install using this way would be pain in the ass, but only complaining wouldn’t solve something, so let’s start doing something real
1. Ruby + Rubygems
i assume you already have ruby installed, below is my configurations
aditmac:~ adit$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
aditmac:~ adit$ gem -v
1.3.3
so at least you need to install ruby 1.8.x or rubygems 1.3.x
2. Install MAMP + EnterpriseDB Postgresql
download MAMP at here
download EnterpriseDB Postgresql at here
install DMG is easy, so i don’t need to explain how to do that
3. Install and config phpPgAdmin
download phpPgAdmin at here
extract the file, copy phpPgAdmin onto htdocs directory on MAMP installation
cp -R Downloads/phpPgAdmin-4.2.2 /Applications/MAMP/htdocs/
cd /Applications/MAMP/htdocs
mv phpPgAdmin-4.2.2 phpPgAdmin
edit phpPgAdmin configurations, file is located at /Applications/MAMP/htdocs/phpPgAdmin/conf/config.inc.php
set $conf[’extra_login_security’] to false
set $conf[’owned_only’] to true
please keep in mind, this configurations should be APPLIED for localhost or development environment only, don’t use this configs for production environment because it’s very less secure
access phpPgAdmin
make sure your PostgreSql daemon is running, in finder, just click Applications/PostgreSql 8.4/Start Server
make sure your Apache daemon is running, you can start it via MAMP control panel
go to http://localhost/phpPgAdmin/, you can login using postgres username