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-
postgresql-server-
postgresql-
==============
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-
rpm -ivh postgresql-server-
rpm -ivh postgresql-
==============
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.




