I installed postgres and tried to start postgres service but failed with errors
[root@c1152-node3 ~]# psql
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"?
[root@c1152-node3 log]# service postgres start
Redirecting to /bin/systemctl start postgres.service
Failed to start postgres.service: Unit not found.
I spent two days trying to figure out what went wrong. Finally, I installed postgresql-server. I am still to start the postgres service. But at least now, I am getting meaningful response from service xxxx start command. Question:- What is the difference between below two packages?
Jul 31 17:39:56 Installed: postgresql-9.2.23-3.el7_4.x86_64
Aug 02 16:45:25 Installed: postgresql-server-9.2.23-3.el7_4.x86_64
Now:-
[root@c1152-node3 log]# systemctl status postgresql
● postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-08-02 16:46:35 UTC; 34min ago
Process: 7817 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=1/FAILURE)
Failed to get boot id: No such file or directory