Install PostgreSQL on CentOS 8

Download and install the latest repo RPM from https://yum.postgresql.org/

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

Disable the built-in PostgreSQL module:

# dnf -qy module disable postgresql

Install PostgreSQL:

# dnf install -y postgresql12-server

Optionally initialize the database and enable automatic start:

# /usr/pgsql-12/bin/postgresql-12-setup initdb
# systemctl enable postgresql-12
# systemctl start postgresql-12

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.