Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

Thanks.

share|improve this question

migrated from stackoverflow.com Aug 9 '13 at 20:09

This question came from our site for professional and enthusiast programmers.

1 Answer 1

When I install Postgres using debs I've got all the config files in /etc/postgresql/9.2/main/. Maybe try changing those files?

Btw, I'm almost sure that you need to restart postgres before those changes will be used.

share|improve this answer
    
solved it. Had to run a command after installing postgresql before the /etc/postgresql/9.2/main/ was created...pg_cluster..something –  user2076941 Aug 9 '13 at 19:19

Your Answer

 
discard

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