Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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
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

Your Answer

 
discard

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.