Skip to content

Instantly share code, notes, and snippets.

@Ch4s3
Last active October 30, 2025 18:42
Show Gist options
  • Save Ch4s3/d2270e8f3d30cadcce859b84d707c794 to your computer and use it in GitHub Desktop.
Save Ch4s3/d2270e8f3d30cadcce859b84d707c794 to your computer and use it in GitHub Desktop.
steps for installing postgres 9.6 on Centos7 or RHEL

Update the RPM package

rpm -ivh https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/pgdg-centos96-9.6-3.noarch.rpm

Update packages

yum update

Install Postgres

yum install postgresql96 postgresql96-server postgresql96-libs postgresql96-contrib postgresql96-devel

Initialize the DB

/usr/pgsql-9.6/bin/postgresql96-setup initdb

Start the Postgres service

systemctl enable postgresql-9.6.service
systemctl start postgresql-9.6.service 
@Ch4s3
Copy link
Author

Ch4s3 commented Oct 30, 2025

Hey all, sorry I haven't touched centos since 2017 a few months after I wrote the gist. I'd be concerned that postgresql 9.6 is far too old to install on newer versions of RHEL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment