I've just installed the postgresql 9.1 on one brand new Ubuntu 12.04 LTS server with the following command : sudo apt-get install postgresql libpq-dev The installation proceeded without errors. Basically I should be able to connect to local server, however when I tap the command psql, the following errors appears :
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"?
I've searched a lot of posts online, but cannot solve problem (very often, the mentioned directory doesn't exist on my server). Can anyone suggests some solutions ? Thanks !
psqlis a client, the server must be running when you attempt to connect to it. See postgresql.org/docs/9.1/static/server-start.htmlsudo /etc/init.d/postgresql-9.1 startorsudo systemctl start postgresqlto start the server ?