I have problem with starting PostgreSQL Server on Centos 7. I installed PostgreSQL with this command: yum install postgresql postgresql-contrib
. Then I added a user with sudo -i -u postgres
command. After that I'm trying to start PostgreSQL Server with psql
command and it gives me an error:
Asked
Active
Viewed 358 times
-1

Gholamali Irani
- 4,391
- 6
- 28
- 59
-
2Possible duplicate of [Psql could not connect to server: No such file or directory, 5432 error?](https://stackoverflow.com/questions/42653690/psql-could-not-connect-to-server-no-such-file-or-directory-5432-error) – gokcand Jan 11 '18 at 15:40
-
1`psql` does not start the server - it connects to an already running server. To start Postgres you need `service postgresql-10 start` (or something similar) – Jan 11 '18 at 16:11
1 Answers
0
https://www.postgresql.org/docs/current/static/app-psql.html
psql
is a terminal-based front-end to PostgreSQL. It enables you to type in queries interactively, issue them to PostgreSQL, and see the query results.
https://www.postgresql.org/docs/current/static/app-pg-ctl.html
pg_ctl
- initialize, start, stop, or control a PostgreSQL server
(formatting mine)

Vao Tsun
- 47,234
- 13
- 100
- 132