How to Install PostgreSQL on CentOS 7

In this tutorial we will show you two different methods on how to install PostgreSQL on your CentOS 7 machine. The first method will walk you through the steps necessary to install PostgreSQL v9.2.23 from the CentOS repositories while the second one will show you how to install the latest version of PostgreSQL from the official PostgreSQL repositories.

If your application doesn’t require the latest version, we recommend using the first method and install PostgreSQL from the CentOS repositories