How to install PostgreSQL 8.4 on CentOS 5.5

postgresql show tables

If you have tried installing PostgreSQL database on CentOS 5.5 using yum, you will notice that you have an old, outdated version! There are several ways to get the 8.4.x version of Postgres installed on this OS, but here is the quick and easy method!

Installing PostgreSQL 8.4.x on CentOS 5.5

  • Download the PostgreSQL 8.4 repository RPM
    wget http://yum.pgrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm
  • Add the repository
    rpm -ivh pgdg-centos-8.4-2.noarch.rpm
  • Use yum to install PostgresSQL
    yum install -y postgresql postgresql-server
  • Initialize the database
    service postgresql initdb
  • Start the database
    service postgresql restart
  • Automatically start database on boot
    chkconfig postgresql on
See also  PostgreSQL Load Balancing: 4 Options Explained

Support us & keep this site free of annoying ads.
Shop Amazon.com or Donate with Paypal

3 thoughts on “How to install PostgreSQL 8.4 on CentOS 5.5”

  1. When service postgresql initdb:

    If (“Data directory is not empty”)
    {
    (
    rm -f -r /usr/local/pgsql/data
    or
    rm -f -r /var/lib/pgsql/data
    )
    su postgres
    initdb -D /var/lib/pgsql/data
    };

Leave a Comment