Install Postgresql 14 on Fedora 35/34/33, CentOS/RHEL/Rocky Linux 8.5 - Comment Page: 4
This is guide, howto install PostgreSQL 15/14/13/12 database server on Fedora 35/34/33, CentOS/Red Hat (RHEL)/Rocky Linux 8.5. This guide uses PostgreSQL own YUM repos, which are always up-to-date and stable releases are available instantly. You can use this guide to install any Postgresql versions, like 15, 14, 13, 12 etc.
[inttf_post_ad1]
Check video guide howto install PostgreSQL 14/13/12 on Fedora 35/34 using PostgreSQL's own dnf repo:
Check video guide howto install PostgreSQL 14/13/12 on Rocky Linux 8.5 using PostgreSQL's own dnf repo:
Watch More Videos and Subscribe to if-not-true-then-false.com Youtube Channel
Note: If you are upgrading PostgresSQL...
What are the ownership and permissions of /var/lib/pgsql supposed to be? I am following the install procedure for postgresql on https://www.if-not-true-then-false.com/2012/install-postgresql-on-fedora-centos-red-hat-rhel/ and am at step 2.1 for fedora 24
su – postgres -c /usr/pgsql-9.5/bin/initdb
which fails with “authentication failure”
Changing to
su
su -c ‘/usr/pgsql-9.4/bin/initdb’ postgres
fails with “su: failed to execute /var/lib/pgsql: Permission denied”
the file permissions and ownership are
sudo ls -alt /var/lib/pgsql
drwx——. 4 postgres postgres 4096 Oct 5 11:08 .
Do I have a file permissions/ownership problem or something else?
This guide was extremely helpful installing 9.4. I imagine installing 9.5 on Fedora 24 and above would be similar. Can we get a guide on how to handle migration from 9.4 to 9.5?
It’d be much appreciated.
Thanks for the tutorial Postgres installation works for me.
Much appreciated walk through — the most recent and accurate I have found.
Minor typo in the most recent guide (11.1)
Modify PostgreSQL /var/lib/pgsql/10/data/pg_hba.conf (host-based authentication) file:
should be
Modify PostgreSQL /var/lib/pgsql/11/data/pg_hba.conf (host-based authentication) file:
Hi Mart van de Ven,
Thanks, I updated guide!
add
`host all all xx.xx.xx.xx/xx md5`
into /var/lib/pgsql/11/data/pg_hba.conf will cause systemd not able to start postgre service6
Hi,
This is only example use real ip/subnet, of course not just xx.xx.xx.xx/xx.
This url would not work for me installing on Fedora 28:
dnf install https://download.postgresql.org/pub/repos/yum/11/fedora/fedora-28-x86_64/pgdg-fedora11-11-2.noarch.rpm
This one did:
sudo dnf install https://download.postgresql.org/pub/repos/yum/11/fedora/fedora-28-x86_64/pgdg-fedora-repo-latest.noarch.rpm
Everything else works as advertised. Excellent article. Thanks for the post.
On Fedora 29 /usr/pgsql-11/bin/postgresql-11-setup initdb =
/usr/bin/postgresql-setup –initdb
2.3 Set PostgreSQL Permissions
Modify PostgreSQL /var/lib/pgsql/11/data/pg_hba.conf
needs to be
Modify PostgreSQL /var/lib/pgsql/14/data/pg_hba.conf
Thanks so-far!
Thanks, updated!