



Login test database (as postgres user) psql testĬreate New “testuser” Role with Superuser and Password CREATE ROLE testuser WITH SUPERUSER LOGIN PASSWORD 'test' 2.4 Start PostgreSQL Server and Autostart PostgreSQL on Boot Fedora 35/34/33 and CentOS / Red Hat (RHEL) / Rocky Linux 8.5 # Start PostgreSQL 14 #Ģ.5 Create Test Database and Create New User Change to postgres user su - postgresĬreate test database (as postgres user) createdb test You can find more examples and full guide from PostgreSQL pg_hba.conf manual. Host all all xx.xx.xx.xx/xx scram-sha-256 Modify PostgreSQL /var/lib/pgsql/14/data/pg_hba.conf (host-based authentication) file: # Local networks

Or if you want use specific ip, then use following: listen_addresses = '192.1.2.33' If you want just localhost setup, then use following: listen_addresses = 'localhost' Open /var/lib/pgsql/14/data/nf file, and add/uncomment/modify following: listen_addresses = '*' usr/pgsql-14/bin/postgresql-14-setup initdbĢ.2 Set PostgreSQL Server to Listen Addresses and Set Port Configure PostgreSQL 14 2.1 Initialize Cluster with initdb Command # Fedora 35/34/33 and CentOS/RHEL/Rocky 8.5 # FedoraĪdd exclude to /etc//fedora.repo file section: Īdd exclude to /etc//fedora-updates.repo file section: ĭisable postgresql module: dnf -qy module disable postgresqlġ.3 Install PostgreSQL 14 Repository Fedora 35/34/33 # Fedora 35/34/33 #ĬentOS/RHEL/Rocky Linux 8 # CentOS/RHEL/Rocky Linux 8.5 - x86_64 - 64-bit #ġ.4 Install PostgreSQL 14 using DNF/YUM # Fedora 35/34/33 #ĭnf install -y postgresql14 postgresql14-serverĢ. Exclude PostgreSQL packages from the repository of the distro. This is important step to get PostgreSQL repository working properly. Install PostgreSQL 14 Database Server on Fedora 35/34/33, CentOS/Red Hat (RHEL)/Rocky Linux 8.5 1.1 Change root user su -ġ.2 Exclude Fedora, CentOS, Red Hat (RHEL) and Rocky Linux own PostgreSQL Packages Note: If you are upgrading PostgresSQL (from earlier version), then make sure that you backup (dump and copy) your database and configs.
