Install PostgreSQL 8.4 Database Server on CentOS, Fedora, Red Hat - Comment Page: 2
This is quick guide howto install PostgreSQL 8.4 (current stable 8.4.7) database server on CentOS, Fedora and Red Hat. Fedora 14, Fedora 13, CentOS 5.5 and Red Hat (RHEL) 5.5 has PostgreSQL 8.4 database server as default so extra repositories is not needed. Personally, I like to use Postgres own repositories, because the latest version of PostgreSQL may be quickly and easily installed. The following commands run as root and postgres user, so "su -" or "sudo -i" first.
Install PostgreSQL 8.4 Database Server Using PostgreSQL's repositories
Install PostgreSQL repository:
## CentOS
rpm -Uvh http://yum.pgrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm
## Fedora
rpm -Uvh...
I am finally installing postgreSQL on my Centos 5.8….using nano editor i Set PostgreSQL server to listen all addresses and Change PostgreSQL port (default is 5432). Just don’t know how to add local host when my IP looks likes this…..192.168.77.85….example shows something like 10.20.4.0/24
*********************************************
host all all xx.xx.xx.xx/xx md5
# Example
host all all 10.20.4.0/24 md5
*********************************************
Please help….assignment is haunting me. Thanks
Hi John,
You can add single address, like following:
Hi all,
I can’t connect localhost to postgres in RHEL 6, I try:
# psql -h localhost -U testuser test
psql: FATAL: la autentificación Ident falló para el usuario «testuser»
But in my /var/lib/pgsql/data/pg_hba.conf I have:
host all all 127.0.0.1/32 ident
host all all 0.0.0.0/0 md5
Also I have disabled iptables too so, what can be happening?
Regards,
Hi Pedro,
You use ident-based authentication (uses your os user accounts), but I guess you want use trust or md5 instead?
[[email protected] ~]# /etc/init.d/postgresql initdb
Data directory is not empty! [FAILED]
What am I missing?
Hi Tony,
Do you want install just PostgreSQL 8.4? Or maybe latest PostgreSQL version 9.2?
Third party software requirements. I’m not sure if 9.2 works with Cisco DCNM. But I’ll give it a try.
I see.
Actually PostgreSQL 8.4 should work still okay, so could you post output of following commands:
Do you have already database running, or tried to install it another way?
JR,
I could’ve sworn I replied back with my results. Anyways thanks for the guide it helped me alot. I’m not sure why I couldn’t find the iptables for Cent0S6.4 but I skipped that step and tested. Everything is fine now. I ended up starting from scratch, uninstalled the software and removing psql folders, started the guide over using this guide and the 9.2 guide. Thanks again.
So I have to install Postgres again on another server but I’m getting this error when installing repositories.
Retrieving http://yum.pgrpms.org/reporpms/8.4/pgdg-redhat-8.4-2.noarch.rpm
error: skipping http://yum.pgrpms.org/reporpms/8.4/pgdg-redhat-8.4-2.noarch.rpm – transfer failed – Unknown or unexpected error
Is there another alternative route?
Also even if I couldn’t add the repo I still ran:
yum install postgresql84 postgresql84-server postgresql84-contrib
I got a list of what was available:
================================================================================
Installing:
postgresql84 x86_64 8.4.13-1.el5_8 base 3.7 M
postgresql84-contrib x86_64 8.4.13-1.el5_8 base 399 k
postgresql84-server x86_64 8.4.13-1.el5_8 base 5.2 M
Installing for dependencies:
libxslt x86_64 1.1.17-4.el5_8.3 base 424 k
postgresql84-libs x86_64 8.4.13-1.el5_8 base 211 k
Transaction Summary
================================================================================
Install 5 Package(s)
Upgrade 0 Package(s)
Total download size: 9.9 M
Is this ok [y/N]:
But when I hit y and enter I get this:
Downloading Packages:
http:///mrepo/rhel5-prod-x86_64/RPMS.os/postgresql84-libs-8.4.13-1.el5_8.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http:///mrepo/rhel5-prod-x86_64/RPMS.os/postgresql84-contrib-8.4.13-1.el5_8.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http:///mrepo/rhel5-prod-x86_64/RPMS.os/libxslt-1.1.17-4.el5_8.3.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://puppet.unica.net/mrepo/rhel5-prod-x86_64/RPMS.os/postgresql84-8.4.13-1.el5_8.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http:///mrepo/rhel5-prod-x86_64/RPMS.os/postgresql84-server-8.4.13-1.el5_8.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error Downloading Packages:
postgresql84-contrib-8.4.13-1.el5_8.x86_64: failure: postgresql84-contrib-8.4.13-1.el5_8.x86_64.rpm from base: [Errno 256] No more mirrors to try.
postgresql84-8.4.13-1.el5_8.x86_64: failure: postgresql84-8.4.13-1.el5_8.x86_64.rpm from base: [Errno 256] No more mirrors to try.
postgresql84-libs-8.4.13-1.el5_8.x86_64: failure: postgresql84-libs-8.4.13-1.el5_8.x86_64.rpm from base: [Errno 256] No more mirrors to try.
postgresql84-server-8.4.13-1.el5_8.x86_64: failure: postgresql84-server-8.4.13-1.el5_8.x86_64.rpm from base: [Errno 256] No more mirrors to try.
libxslt-1.1.17-4.el5_8.3.x86_64: failure: libxslt-1.1.17-4.el5_8.3.x86_64.rpm from base: [Errno 256] No more mirrors to try.
Hi Tony,
Looks like yum try downloading packages from wrong mirrors (mrepo?).
Right packages found here: http://yum.postgresql.org/8.4/redhat/rhel-5-x86_64/
Is it possible to have postgresql installed in a different directory?