Initialize-database error - Postgresql on FC1

Fedora Core 1
Postgresql 7.3.4

./configure --with-web-user=apache --with-web-group=apache

–prefix=/usr/local/rt/rt3 --with-db-type=Pg --with-db-dba=postgres

perl sbin/rt-test-dependencies --with-pg --with-modperl2 --install

make install

su - postgres

$ psql -U postgres template1

template1=# alter user postgres with encrypted password ‘the_password’;

template1=# \q

$ exit

# make initialize-database

/usr/bin/perl //usr/local/rt/rt3/sbin/rt-setup-database --action init
–dba postgres --prompt-for-dba-password
In order to create a new database and grant RT access to that database,
this script needs to connect to your Pg instance on localhost as postgres.
Please specify that user’s database password below. If the user has no
database
password, just press return.

Password: DBI connect(‘dbname=template1;host=localhost’,‘postgres’,…)
failed: could not connect to server: Connection refused at
//usr/local/rt/rt3/sbin/rt-setup-database line 80
Failed to connect to dbi:Pg:dbname=template1;host=localhost as postgres:
could not connect to server: Connection refused at
//usr/local/rt/rt3/sbin/rt-setup-database line 80, line 1.
make: *** [initialize-database] Error 255

Any ideas?
Thanks,
Phil

Phil Lawrence wrote:

Fedora Core 1
Postgresql 7.3.4

# make initialize-database


Password: DBI connect(‘dbname=template1;host=localhost’,‘postgres’,…)
failed: could not connect to server: …

Tom Good (http://www.sqlclinic.net) provided the answer. pg_hba.conf as
shipped by FC1 doesn’t allow linux users to login to pg using any
username other than their own, linux user name. So in this case, root
is attempting to login as postgres.

Here’s the change:

TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD

local all all trust
host all all 127.0.0.1 255.255.255.255 trust

Phil