Postgres Database Server on CentOS

Postgres is an open-source object-relational database that focuses on extensibility and standards compliance. For more information visit the Postgres homepage.

Install Postgres Yum Repo

Postgres has made yum repos available which make installation easy, so the first step is to set it up by installing their RPM.

Install Postgres DB Server

Postgres has grouped together the necessary packages for the database server to make it easy to install with a single command line.

yum groupinstall "PostgreSQL Database Server 9.3 PGDG"

Initialize the database

You can initialize the database files with the init script that was installed with the RPMs via yum.

service postgresql-9.3 initdb

Start Postgres

We’ll use the included init script to start it up.

service postgresql-9.3 start

Start Postgres at Boot

The chkconfig program is used to start the postgresql db server at boot.

/sbin/chkconfig postgresql-9.3 on