Installing Postgresql 9.0 in Centos 6

Installing Postgresql 9.0 in Centos 6 is done in few easy steps.

First, download the Postgresql 9.0 RPM package:
wget http://yum.pgrpms.org/9.0/redhat/rhel-6-x86_64/pgdg-centos90-9.0-5.noarch.rpm

Install the package:
rpm -i pgdg-centos90-9.0-5.noarch.rpm

To avoid conflict with older postgresql packages existing in the Centos distribution, you must tell yum to exclude these in the installation. You must edit the CentOS-Base.repo file:
vi /etc/yum.repos.d/CentOS-Base.repo

Add this line at the [base] section:
exclude=postgresql*

Verify that the new package is active:
yum list

Then yum install postgres:
yum install postgresql90 postgresql90-devel postgresql90-server postgresql90-libs

Initialize postgresql:
service postgresql-9.0 initdb

Then start postgresql:
service postgresql-9.0 start

You are done with the installation.

The configuration that I you still need to do is to is edit the postgresql.conf file located in /var/lib/pgsql/9.0/data/ Be sure to add this line in the config:
listen_addresses = '*'

To enable remote access, I added this to the pg_hba.conf located in the same directory:
host all all 110.93.88.91 255.255.255.255 md5

1 comments:

Anonymous said...

Hi! I know this is sort of off-topic but I had to ask.
Does running a well-established blog such as yours require a large amount of work?

I am completely new to writing a blog however I do write in my diary
everyday. I'd like to start a blog so I will be able to share my experience and thoughts online. Please let me know if you have any ideas or tips for new aspiring bloggers. Appreciate it!

Here is my weblog; Bench Craft Company advertising agencies alpharetta ga