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 https://obtain.postgresql.org/pub/repos/yum/reporpms/F-36-x86_64/pgdg-fedora-repo-latest.noarch.rpm # Fedora 35 sudo dnf set up -y https://obtain.postgresql.org/pub/repos/yum/reporpms/F-35-x86_64/pgdg-fedora-repo-latest.noarch.rpm
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 within the
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
sudo /usr/pgsql-14/bin/postgresql-14-setup initdb
PostgreSQL information is normally discovered
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. postgres=#
Set password for
postgres (Database administrator) consumer.
That’s All. I’m hoping you have got realized tips on how to set up PostgreSQL on Fedora 36 / Fedora 35.