Install PostgreSQL 8.4 Database Server on CentOS, Fedora, Red Hat - Comment Page: 1

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...

41 comments on “Install PostgreSQL 8.4 Database Server on CentOS, Fedora, Red Hat - Comment Page: 1

1 2
    1. after editting hba file , I wasn’t able to start postgresql. Then I tried next thing that is iptable , but it says ‘having error in line 13’ which is the line I added before comet as you said.

      Don’t know what is wrong , my system is i686 archetecture and I have installed postgresql for that only but still their is problem. I can’t restart or start.

      Reply
      • Hi Dhawal,

        It is impossible to say any reason without seeing to conf files.

        So could you post your /var/lib/pgsql/data/pg_hba.conf file and your /etc/sysconfig/iptables file?

        Reply
      • Hi Andrus,

        Working address is currently:
        http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-fedora-8.4-2.noarch.rpm

        I updated it to this guide also.

        I have not tested this guide with Fedora 11, but I think this should work nicely with Fedora 11 (and even fc10, fc9…), because PostgreSQL 8.4 doesn’t have any dependencies to Fedora 12 or Fedora 13 packages.

        Please let me know, if you get it working or if you have any problems?

        Reply
    2. Thank you.
      In Fedora 11 there is no /etc/sysconfig/iptables file mentioned.
      How to open 5432 port? How to find router IP address ? Maybe router needs also configured.

      Where to find instructions to install latest mono + mod_mono in Fedora 11 ?
      yum mod_mono installs old 2.4 version.

      Andrus.

      Reply
      • In Fedora 11 try add configurations to /etc/iptables.up.rules file.

        It is difficult to say anything about network configuration without seeing it.

        Reply
        • [[email protected] /etc]# ls /etc/ipt*
          ls: cannot access /etc/ipt*: No such file or directory

          There is no to /etc/iptables.up.rules in Fedora 11

          Reply
          • Ok, I do not have Fedora 11 now, but then try simple something like following (as root):

            
            /sbin/iptables -I INPUT 1 -p tcp --dport 5432 -j ACCEPT
            ## OR ##
            /sbin/iptables -I INPUT 1 -p tcp --dport postgres -j ACCEPT
            

            Save rules (as root):

            
            /sbin/service iptables save
            
            Reply
    3. CREATE ROLE testuser WITH SUPERUSER LOGIN PASSWORD=’test’;

      is incorrect. correct is

      CREATE ROLE testuser WITH SUPERUSER LOGIN PASSWORD ‘test’;

      Reply
      • Yes you’re right, it’s typo.

        I fix it to guide.

        Thanks!

        Reply
    4. Another typo that got me, because I was copy-n-pasting. That should be

      listen_addresses = ‘*’

      *not*

      listen_addressses = ‘*’

      Count the S’s

      Reply
      • Hi Nick,

        Thans for the correction!

        Updated guide again… :)

        Reply
    5. […] Fedora 13Install Adobe (Acrobat PDF) Reader on Fedora 13Install VirtualBox (with yum) on Fedora 13Install PostgreSQL 8.4 Database Server on Fedora 13Install NetBeans 6.9 on Fedora 13Install tint2 Panel/Taskbar and tint2 Themes on Fedora 13   […]

      Reply
    6. […] Fedora 13Install Adobe (Acrobat PDF) Reader on Fedora 13Install VirtualBox (with yum) on Fedora 13Install PostgreSQL 8.4 Database Server on Fedora 13Install NetBeans 6.9 on Fedora 13Install tint2 Panel/Taskbar and tint2 Themes on Fedora 13   […]

      Reply
    7. I would like to recommend to also install the contrib libraries (for VACUUMing etc),
      since v8.2 it is a separate package (postgresql84-contrib)

      yum install postgresql84 postgresql84-server postgresql84-contrib

      /patrick

      Reply
      • Hi Patrick,

        Thanks for the tip!

        I added it in the guide.

        Reply
    8. Hi
      i have followed your guide and installed the pgsql. i am using fedora 12.
      i have done the following

      # rpm -Uvh http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-fedora-8.4-2.noarch.rpm
      # yum install postgresql postgresql-server postgresql-contrib

      but when i run the below command i get the error like
      # service postgresql initdb

      the error i get
      /etc/init.d/postgresql: line 24: /etc/sysconfig/network: No such file or directory

      i have just started learning linux 2 days ago so i have no idea how do i solve problem. please guide me to fix it

      Reply
      • Hi sankar,

        Are you running service postgresql initdb command as root?

        Could you post following command output:

        
        ls -la /etc/sysconfig/network
        
        Reply
        • Hi,
          Yes i am running those command from root

          [[email protected] Sankar]# service postgresql initdb
          /etc/init.d/postgresql: line 24: /etc/sysconfig/network: No such file or directory

          [[email protected] Sankar]# ls -la /etc/sysconfig/network
          ls: cannot access /etc/sysconfig/network: No such file or directory

          [[email protected] Sankar]#

          please help i am stuck!!
          with regards………

          Reply
          • Okey you don’t have /etc/sysconfig/network file. Is your network working normally?

            You could create /etc/sysconfig/network file with following command (as root):

            
            echo "NETWORKING=yes" > /etc/sysconfig/network
            

            Then try again and see what happens?

            Btw. I wonder just why you’ve installed Fedora 12 distro a few days ago? Fedora 14 is coming very soon.

            Reply
      • Hi Stephen,

        Actually pgsqlrmps not working with RHEL 6 so try pgrpms, install following instead:

        
        rpm -Uvh http://yum.pgrpms.org/reporpms/8.4/pgdg-redhat-8.4-2.noarch.rpm
        

        And then continue installation procedure normally. I updated this guide to use pgrpms.org…

        Reply
    9. hi jr i am stuck..
      when trying to change to postgres i am getting
      bash 3.2$

      whats the problem???
      though there is user created in /etc/passwd as postgres by default
      please help me out

      Reply
      • no problem at all , postgres is the account under it postmaster is running.

        Reply
    10. GREAT!!!!! THANKS THANKS THANKS

      Reply
    11. There are changes in Fedora 16 to init the database:

      sudo service postgresql initdb
      > Redirecting to /bin/systemctl initdb postgresql.service
      > Unknown operation initdb

      This command has changed in Fedora 16. The correct command is now:
      $ sudo postgresql-setup initdb

      Reply
    12. Hi guys, i have Centos-5.8-i386-server-VMware workstation and wanna know, am i on the right track to install PostgreSQL 8.4 on this machine? Does it matter which version of Centos, Fedora or any platform we use or what i am ok so far! I will start from the beginning of this link, if you see something wrong here please let me know or just let me go through the learning curve. Thanks for sharing this link.

      bye now
      John

      Reply
1 2

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close