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 264 times
-1
Gholamali-Irani
- 4,237
- 6
- 27
- 56
-
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) – a_horse_with_no_name Jan 11 '18 at 16:11
1 Answers
0
https://www.postgresql.org/docs/current/static/app-psql.html
psqlis 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
- 42,665
- 8
- 85
- 115