Updating PostgreSQL With yum

Posted by Johan Cyprich on 08 Jan 2008 | Tagged as: Tech Tips

One of the easiest way to install software on Red Hat, Fedora, or CentOS Linux distributions is through yum. Its faster to use than GUI installers and it just requires entering the following command:

yum -y install postgresql postgresql-server php-pgsql

The versions of PostgreSQL that can be updated are 7.3 to 8.3 and is available for Fedora (versions 7 and 8), Red Hat Enterprise Linux (versions 3, 4, and 5), and CentOS (versions 3, 4, and 5). PostreSQL is available on the 32-bit and 64-bit x-86 architectures.

Before running this command, you need to add configuration settings to the yum repository, which can be found at /etc/yum.conf or alternately save the settings in a file in the /etc/yum.repos.d folder (i.e. name the settings for Fedora as fedora.repo).

Configuration File for Fedora

# Please change the PostgreSQL major release number , if you need.
[pgdg82]
name=PostgreSQL $releasever - $basearch
baseurl=http://yum.pgsqlrpms.org/8.2/fedora/fedora-$releasever-$basearch
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

Configuration File for Red Hat and CentOS

# Please change the PostgreSQL major release number , if you need.
[pgdg82]
name=PostgreSQL 8.2 $releasever - $basearch
baseurl=http://yum.pgsqlrpms.org/8.2/redhat/rhel-$releasever-$basearch
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

Starting PostgreSQL

Once the PostgreSQL is installed, you need to configure the operating system to automatically start it when the system is booted. This can be done through the Services command in the GUI, or at the command line with:

/sbin/chkconfig postgresql on
/sbin/service postgresql start

Testing the DBMS

You can check if the software was correctly installed by running it with the following commands:

su - postgres
psql template1

Setting Permissions

The access configuration file in /var/lib/pgsql/data/pg_hba.conf should be set to use “trust” instead of “identity” as follows:

local all all trust

You’ll need to restart the database service after making this change by:

/sbin/service postgresql restart


Related posts:
    PostgreSQL Using Too Much Memory
    Migrating Data from Postgres 7 to 8
    Deprecating Functions in Visual C++ 2005
    Joomla 1.5 RC4 Released

Share this post:

del.icio.us:Updating PostgreSQL With yum digg:Updating PostgreSQL With yum spurl:Updating PostgreSQL With yum wists:Updating PostgreSQL With yum simpy:Updating PostgreSQL With yum newsvine:Updating PostgreSQL With yum blinklist:Updating PostgreSQL With yum furl:Updating PostgreSQL With yum reddit:Updating PostgreSQL With yum fark:Updating PostgreSQL With yum blogmarks:Updating PostgreSQL With yum Y!:Updating PostgreSQL With yum smarking:Updating PostgreSQL With yum magnolia:Updating PostgreSQL With yum segnalo:Updating PostgreSQL With yum gifttagging:Updating PostgreSQL With yum

Follow Me:

Did you find this post interesting and useful? You can keep up to date on this blog by subscribing to my RSS feed, or you can have new posts sent to you by e-mail. You can also follow me on Twitter.


One Response to “Updating PostgreSQL With yum”

  1. on 24 Jul 2008 at 9:59 am 1.kdas said …

    Thanks…….

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply