[GRASSLIST:1397] Re: postgreSQL problem
Antonio
nightnavigator at libero.it
Fri Oct 3 18:27:35 EDT 2003
* giovedì 02 ottobre 2003, alle 19:06, Uttam Kumar scrive:
> Hi GRASS users,
> I have downloaded the postgreSQL-7.3.4. I unzipped it and
> then went to the same dir of the postgresql and then installed it as
> follows:
> 1.) ./configure --prefix=/home/grass0pre3/psql
> --bindir=/home/grass0pre3/bin --without-readline
> 2.) gmake
> 3.) gmake check
> 4.) gmake install-all-headers
> 5.) gmake distclean
>
> Then I wrote the following line in /etc/ldconfig
> "/home/grass0pre3/psql/lib" for the shared libraries.
> Then I created a database and initialized it
>
> root# mkdir /home/grass0pre3/psqldata
> root# chown grass0pre3 /home/grass0pre3/psqldata
> root# su grass0pre3
> grass0pre3$ initdb -D /home/grass0pre3/psqldata
>
> Lastly I started the server with
>
> /home/grass0pre3/bin/postmaster -i -p 5432 -D /home/grass0pre3/psqldata
> >logfile 2>&1 &
>
> Now when I run
>
> createdb abc
> and then
> g.select.pg database=abc
>
> I get the following error...
>
> Error: select Postgres:could not connect to server: Connection refused
> Is the server running on host localhost and accepting
> TCP/IP connections on port 5432?
>
> an any body tell me the problem and its related solution or have I missed
> anything during installation.
>
It typically seems a problem concerning postgres not accepting
connections on the 5432 socket.
I suggest a few things:
a) go and set the tcpip_socket value to 1 (not 0) in the postgresql.conf
file (do a find to see where it is or try with "whereis
postgresql.conf";
b) edit the pg_hba.conf file (should be in the same dir) and make sure
you have something like this:
local all ident
sameuser
host all 127.0.0.1 255.0.0.0 ident
sameuser
host all 0.0.0.0 0.0.0.0 reject
host all 192.168.0.3 255.255.255.0 ident sameuser
in it.
It should do the game :-)
Bye
More information about the grass-user
mailing list