PostgreSQL Installation in RHEL pgsql

June 10, 2008 | In: Pgsql

This is for fresh install. If you are going for an upgrade, you need to check out the steps from the link.

==============
http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html
==============

It is easy to install it via yum or up2date.
However, if you need a specific version, it is better to go for rpm installation.

Using yum

==============
yum groupinstall postgresql
==============

Using up2date.

==============
up2date @ postgresql
==============

Using rpm. You need three rpm.

==============
postgresql-libs--1PGDG.rhel
postgresql-server--1PGDG.rhel
postgresql--1PGDG.rhel
==============

Download the RPM from rpm.pbone.net for your coresponding OS and the required version.

dowload it to

==============
/usr/local/src/
==============

Install them using

==============
rpm -ivh postgresql-libs--1PGDG.rhel
rpm -ivh postgresql-server--1PGDG.rhel
rpm -ivh postgresql--1PGDG.rhel
==============

Once you have completed this you need can start the service.

==============
/etc/rc.d/init.d/postgresql start
==============

Edit the file ‘/var/lib/pgsql/data/pg_hba.conf’, replace all entries of “ident sameuser” with “trust”.
Edit the file ‘/var/lib/pgsql/data/postgresql.conf’, change the line “max_connections=100″ to atleast max_connections=500”.

Restart PostgreSQL.

If the initialisation fails the files pg_hba.conf and postgresql.conf will not be created.
In such a case, perform the following operation.

Check the startup log which is found in /var/lib/pgsql/

==============
chown postgres /var/lib/pgsql/data
su postgres
initdb –D /var/lib/pgsql/data
==============

To make sure it starts automatically on boot – do the following command

==============
chkconfig –list
chkconfig postgresql on
==============

Kill all the currently running postgre processes.

==================
ps aux | grep post
==================

==================
kill -9 …..
==================

Try starting it again.
🙂

mm
Hi All… I have been working the IT Industry since last ten years… Specialized in Linux, Cloud Infrastructure and Solution Design.
On the hobby friend, I do research on IOT, Micro-controllers, Electronics etc.
Music is my passion..Connect me on..

Comment Form

*

Authors

mm
Presoon John

Hi All... I have been working the IT Industry since last ten years... Specialized in Linux, Cloud Infrastructure and Solution Design.
On the hobby friend, I do research on IOT, Micro-controllers, Electronics etc.
Music is my passion..Connect me on..

Access this post via Mobile

Scan the QR Code
QR Code Generator

Categories