How to Install PostgreSQL on Fedora 36 / Fedora 35 | Holhol24


PostgreSQL is a unfastened object-relational database control gadget (ORDBMS). It is to be had for Linux, FreeBSD, Solaris, Microsoft Windows, and macOS.

PostgreSQL was once evolved by way of the PostgreSQL Global Development Group and launched below the PostgreSQL License.

Here, we can see tips on how to set up PostgreSQL on Fedora 36 / Fedora 35.

Install PostgreSQL on Fedora 36

Setup PostgreSQL repository

PostgreSQL construction team gives applications thru a devoted repository for all Linux platforms, and the applications are more energizing than the ones to be had within the OS repositories. So, configure the PostgreSQL repository by way of putting in the PostgreSQL repository bundle.

# Fedora 36

sudo dnf set up -y

# Fedora 35

sudo dnf set up -y

Install PostgreSQL

When scripting this put up, PostgreSQL v14,13,12,11, and 10 are to be had for Fedora. You can set up a selected model of PostgreSQL citing postgresql-server within the dnf command.

For instance, to put in PostgreSQL 14, use the beneath command.

sudo dnf set up -y postgresql14-server

Initialize PostgreSQL Server

After putting in PostgreSQL, it is very important initialize it sooner than the use of it for the primary time. Change the beneath command according to the PostgreSQL model /usr/pgsql-/bin/postgresql--setup initdb.

sudo /usr/pgsql-14/bin/postgresql-14-setup initdb

PostgreSQL information is normally discovered /var/lib/pgsql//information/ listing.

After initializing the PostgreSQL database, get started the PostgreSQL carrier and allow it on gadget startup.

sudo systemctl allow --now postgresql-14

Finally, test the standing of the PostgreSQL carrier.

sudo systemctl standing postgresql-14

Access PostgreSQL server

To create a database, log in as postgres (Linux consumer) after which get right of entry to the database the use of the psql command. PSQL is an interactive terminal for operating with the PostgreSQL database.

$ sudo su -l postgres

$ psql


psql (14.4)
Type "help" for assist.


Set password for postgres (Database administrator) consumer.

postgres=# password


That’s All. I’m hoping you have got realized tips on how to set up PostgreSQL on Fedora 36 / Fedora 35.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More