PostgreSQL 11 Install Steps?

Hello Community,

I am struggling to install PostgreSQL 11 on CL. Can someone please lineout the steps to install and configure Postgres 11 so that the DB is running after startup and can be connected to - this would be much appreciated. Thanks !

Matthias

Have you installed the postgresql11 bundle? After installing, you should only need to systemctl start postgresql11.service.

Give that a try first.

Ok, I did, but to no avail.

The command executes without error or any message.

As far as I can tell after installing with

sudo swupd bundle-add postgresql11

the main tools of postgres are missing, no psql or any other command is installed.

I saw that if you use:

sudo swupd bundle-add postgresql

you will get a postgres 9.6 installation including all the tools. Why are they missing in postgresql11 bundle ?

I now found the command files in:

usr/libexec/postgresql11/

so I will now add this folder to the path variable (which maybe should be included in the postgresql11 bundle script). The next step should then be the modifikation of the pg_hba.conf file.

You have to use pg_ctl11 etc…

Thank you Auke, works now !

It appears the same is not true of the postgresql12 bundle.
command not found: pg_ctl12

When I try to switch to the postgres user, I get a password prompt. sudo su postgres returns This account is currently not available.

How do I initialize using pg_ctl11 init as the postgres user on Clear Linux?