https://www.postgresql.org/download/
Select the appropriate version
After installation is complete, a little configuration, otherwise it is impossible Remote Access:
cd / var / lib / pgsql / 11 / computer
vi postgresql.conf
increase
listen_addresses = '*'
port = 9310
You can use the default port port without modification
there pg_hba.conf
increase
host all all 0.0.0.0/0 md5
New User
su - postgres
psql -p 9310
postgres=# CREATE USER dbuser WITH PASSWORD '*****';
postgres=# CREATE DATABASE exampledb OWNER dbuser;
postgres=# GRANT ALL PRIVILEGES ON DATABASE exampledb TO dbuser;