The default installation of PostgreSQL in Debian etch is not yet well configured, and so not suitable to work with phppgadmin, too. This simple mini-HOWTO will guide you though those critical but minor procedures, which will let all of your PostgreSQL functioning within 5 min :)
apt-get update apt-get install postgresql-8.1 postgresql-client-8.1 postgresql-doc-8.1 phppgadmin php5-pgsql libapache2-mod-php5
Login pgsql console as user “postgres”:
localhost:~# su localhost:~# su - postgres postgres@localhost:~$ psql template1 Welcome to psql 8.1.9, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit template1=#
Update pgsql user “postgres” password (required by phppgadmin):
template1=# ALTER USER postgres PASSWORD 'passwd'; ALTER ROLE template1=# \q postgres@localhost:~$
Create pgsql user “root” with database “AL32UTF8”, with basic login:
localhost:~# su localhost:~# su - postgres postgres@localhost:~$ createuser -DRS root CREATE ROLE postgres@localhost:~$ createdb -O root AL32UTF8 CREATE DATABASE postgres@localhost:~$ psql template1 Welcome to psql 8.1.9, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit template1=# ALTER USER root PASSWORD 'passwd'; ALTER ROLE template1=# \q postgres@localhost:~$ psql AL32UTF8 Welcome to psql 8.1.9, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit AL32UTF8=# \q postgres@localhost:~$ exit logout localhost:~# psql AL32UTF8 Password: Welcome to psql 8.1.9, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit AL32UTF8=> \q localhost:~#
Edit /etc/phppgadmin/config.inc.php, change the following line from:
$conf['extra_login_security'] = true;
into:
$conf['extra_login_security'] = false;
in order to allow root/postgres user login from phppgadmin.
Create symbolic link for phppgadmin web access:
localhost:~# ln -s /usr/share/phppgadmin /var/www/
Access http://localhost/phppgadmin, login as root or postgres, enjoy your newly installed PostgreSQL server :)