Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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"

share|improve this answer
so it was down, attempting to start it, it says it cannot load file server.cert? – Tony The Lion Jul 11 '10 at 11:04
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

You can also start and stop postgres server without specifying version:

/etc/init.d/postgresql start

start - to start server

stop - to stop server

status - to know status, whether server is running or not

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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