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/config.inc.php)
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/config.inc.php 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

source:
http://www.asconix.com/howtos/debian/postgresql-debian-lenny-howto

Advertisements

~ 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:

WordPress.com Logo

You are commenting using your WordPress.com 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: