Migration from CentOS 7 to CentOS 8 - problems with postgresql version

I’m trying to migrate existing Foreman(2.1) CentOS 7 instance to CentOS 8 server, and I have a problem with database migration. The version of postgresql on CentOS7 server is 12.1, meanwhile in CentOS8 is 10.14. I don’t know how to approach the problem of changing the version on the CentOS8 machine.
I couldn’t find any repo for CentOS8 like @centos-sclo-rh for CentOS7 which provides that kind of postgresql12 packages.

I tried to disabling the build-in postgresql module by:

sudo dnf -qy module disable postgresql

and then installing the postgres12 repo by:

sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

but then after I run foreman-installer, I get “Could not find command ‘/usr/bin/initdb’” Error.

Thanks for your time.

Expected outcome:

Installation of postgres12 instead of postgres10 on CentOS8 server

Foreman version:

Foreman: 2.1

There is a PostgreSQL 12 module in CentOS8, did you try that?

dnf module install postgresql:12

Tried it now and it works. Thank you.

1 Like