Install PostgreSQL 9.0.x on CentOS

This tutorial explains how to install PostgreSQL from the official PostgreSQL repository. This method allows you to install newer versions of PostgreSQL for example 9.0 if you need the newest cluster functionality delivered with upcoming PostgreSQL 9.1 you need to build the software manual as long as there is no 9.1 repository available.

If you want to install the stable 8.4 version delivered with CentOS I wrote this tutorial.

1. Download yum repository rpm for your arch and version you want to use:

2. install rpm file

rpm -i <file>.rpm

3. modify CentOS Repository

vi /etc/yum.repos.d/CentOS-Base.repo

add this line:


should look like this:

name=CentOS-$releasever – Base


4. install PostgreSQL

yum install postgresql-server

5.initialize PostgreSQL-Database

service postgresql initdb

6. start service

service postgresql start

7. if you want postgresql to be started at boot time run this:

chkconfig --levels 35 postgresql on

One thought on “Install PostgreSQL 9.0.x on CentOS

  1. Venkata Balaji N

    Hi Byman,

    when we say yum install postgresql-server.. which version will be installed.

    I need to install Postgresql-9.0.1 on CentOS 5.4

    I have downloaded tar file of the same.

    Please help !


Leave a Reply

Your email address will not be published. Required fields are marked *