How to install PostgreSQL 9.2 on RHEL/CentOS/Scientific Linux 5 and 6
I thought this is pretty straightforward, but I decided to write this post after getting a few emails recently.
First, download PostgreSQL 9.2 repo package from here. Please pick up the correct repo file per your distro and architecture. If you are not sure about your OS version, run
Install the repo RPM. For example, if you downloaded repo RPM for RHEL 6, here is your command:
Alternatively, you can install the package directly by using the repo RPM URL:
Now, you can install PostgreSQL 9.2 with single command:
This will install PostgreSQL 9.2 server, along with -contrib subpackage. If you don't want -contrib subpackage, you can use
to install 9.2 on your machine. Once it is installed, first initialize the cluster:
Now, you can start PostgreSQL 9.2:
If you want PostgreSQL 9.2 to start everytime on boot, run this:
Enjoy!
cat /etc/redhat-release
Install the repo RPM. For example, if you downloaded repo RPM for RHEL 6, here is your command:
rpm -ivh pgdg-redhat92-9.2-7.noarch.rpm
Alternatively, you can install the package directly by using the repo RPM URL:
rpm -ivh http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-redhat92-9.2-7.noarch.rpm
Now, you can install PostgreSQL 9.2 with single command:
yum groupinstall "PostgreSQL Database Server 9.2 PGDG"
This will install PostgreSQL 9.2 server, along with -contrib subpackage. If you don't want -contrib subpackage, you can use
yum install postgresql92-server
to install 9.2 on your machine. Once it is installed, first initialize the cluster:
service postgresql-9.2 initdb
Now, you can start PostgreSQL 9.2:
service postgresql-9.2 start
If you want PostgreSQL 9.2 to start everytime on boot, run this:
chkconfig postgresql-9.2 on
Enjoy!
Comments
Display comments as Linear | Threaded
David A. Leedom on :
Have I tried these install? No not yet...I am just complaining to the "cloud".
Devrim GÜNDÜZ on :
Response from the cloud:
re: pgcrypto
After installing -contrib rpm, here is what you need to do:
postgres=# CREATE EXTENSION pgcrypto ;
CREATE EXTENSION
re: pgagent
Well, it depends on wx packages, which I supply in RPM repo.
D.
Deon Frankenfield on :
Ryan on :
Gurjeet Singh on :
yum groupinstall "PostgreSQL Database Server 9.2 PGDG"
Devrim Gündüz on :
Right, I had to change it recently, for multi version installation Let me update this post. Thanks for the heads up!
Regards, Devrim
Geraldo Jannett on :
Nickolas Ruge on :
Edison Nolton on :
sea freight forwarding Chandigarh on :
Daryl Mcmillin on :
BryanPoura on :
gookerdoughboy777 on :
Vertie Felps on :
Cruz Hessel on :
Eddie Mahn on :
Jarrod Herren on :
Booker Fanton on :
Christel Coppedge on :
Regine Kernagis on :
Dennistonry on :
Randaljak on :
Clintonalota on :
Timothypem on :
JeffreyBax on :
WilsonBuh on :
CharlesSmilm on :
Davidnor on :
FrankSep on :
BrianWeica on :
Michaelbed on :
Aaronnains on :