I ran sudo apt-get install postgresql on ubuntu 12.04. I didnt get a postgresql.config, instead I got a postgresql.config.sample and pg_hba.conf.sample. I renamed these (they installed in usr/share/postgresql) and uncommented listen address to localhost and the port to 5432. But still it doesnt seem to start? I get could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? in my webapp log (no log from postgresql). I have no clue what Im doing could someone please help me? I followed all the tutorials I found on the internet (I re-installed my server 3 times). But I cant get it to work.