Postgres 8.3 (Debian lenny) + phppgadmin

# sudo aptitude install apache2 postgres-common-8.3 phppgadmin
# ln -s /usr/share/phppgadmin /var/www/phppgadmin

“ln -s” sets a link to the webpage of phppgadmin, which puts links of its own config-files (files /etc/phppgadmin/ symlink-destinations /etc/apache2/conf.d and php-conf /usr/share/phppgadmin/conf/
also do not forget to alter the phppgadmin apache.conf in the line of “allow from” to the subnet you want to connect to the tool.

# sudo su – postgres
# psql -c “ALTER ROLE postgres with password ‘<password>’;”

the “-” while using the su is not that important, but with it you have the “same” environment as the normal user (e.g. variables like $PATH).
postgres set no password by default.
now you just need to alter /etc/phppgadmin/ for unsecure logins or put yourself a user account intopostgres for the login on http://localhost/phppgadmin/index.php
you can login into postgres as a user with

# psql -U -h template1

template1 is a default database to connect with
the man page has a lot of information about formatting the output of psql



~ by frankooh on 2011-01-19T14:40:02+00:00.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: