E
E
Eugene2020-02-29 23:38:59
PostgreSQL
Eugene, 2020-02-29 23:38:59

How to set up Postgresql on an Ubuntu virtual machine in the Yandex cloud?

Raised a virtual machine Ubuntu 18.04.4 LTS in the Yandex cloud.
Rolled Postgresql. It seems that the installation was successful and the postgres user appeared and it turns out to switch to it, and when you enter psql we have

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"

Googled the error itself, but could not solve the problem.
The question actually, here in what (perhaps, silly). Is it possible to do so at all? Those. use Postgresql inside a virtual machine ... or does Yandex allow its use only as a separate service for a fee?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2020-03-01
@Hamlet_dat

As a result, I installed a new virtual machine and everything worked.
Those. The answer to the main question is this: You can do this. Yandex.Cloud has no restrictions on using Postgresql inside virtual machines.

E
Evgeny Mamonov, 2020-02-29
@EvgenyMamonov

check if PostgreSQL is running, you can check, for example, like this
netstat -n|grep -i postmaster
The output will be something like this

tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      2414/postmaster

In this case, we connect in this way.
psql -h 127.0.0.1 -p 5432
If you do not have PostgreSQL running, you need to start it :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question