I have installed PostGreSQL 8.3 on an Ubuntu machine and I want to configure a pssw for it, however when I run this command:

sudu su postgres -c psql template1

I get the following error:

"psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?"

Can anybody tell me how I can check if the db server is running locally (only accepting connections on localhost)?

How I can start the psql server?

I'm a Linux newbie, btw

link|improve this question

62% accept rate
feedback

1 Answer

up vote 1 down vote accepted

You can know the status of your Postgres server via the command

"sudo /etc/init.d/postgresql-8.3 status"

To start it you can issue the command

"sudo /etc/init.d/postgresql-8.3 start"

and to stop you can issue the command

"sudo /etc/init.d/postgresql-8.3 stop"

link|improve this answer
so it was down, attempting to start it, it says it cannot load file server.cert? – Tony Jul 11 '10 at 11:04
2  
This happens when postgres ssl is turned on and the certificates is not there. What you can do is open the file /etc/postgresql/8.3/main/postgresql.conf ,there is a line when says ssl = true change that to ssl = false and then start your serevr – proy Jul 11 '10 at 11:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.