Install Postgresql 11.1 on Fedora 29/28, CentOS/RHEL/SL 7.5/6.10 - Comment Page: 2

This is guide, howto install PostgreSQL 11.1 database server on Fedora 29/28/27, CentOS/Red Hat (RHEL)/Scientific Linux (SL) 7.5/6.10. This guide uses PostgreSQL own YUM repos, which are always up-to-date and stable releases are available instantly. You can use this guide to install any Postgresql versions, like 12, 11.1, 10.6, 9.6.11, 9.5.15, 9.4.20, and 9.3.25. [inttf_post_ad1] Note: If you are upgrading PostgresSQL (from earlier version), then make sure that you backup (dump and copy) your database and configs. 1. Install PostgreSQL 11.1 Database Server on Fedora 29/28/27, CentOS/Red Hat (RHEL)/Scientific Linux (SL) 7.5/6.10 1.1 Change root user su - ## OR ## sudo -i 1.2 Exclude...

77 comments on “Install Postgresql 11.1 on Fedora 29/28, CentOS/RHEL/SL 7.5/6.10 - Comment Page: 2

1 2 3 4
    1. One last item for debugging this. This is from psql’s log:

      ‘LOG: end-of-line before authentication method
      CONTEXT: line 90 of configuration file “/var/lib/pgsql/9.2/data/pg_hba.conf”
      FATAL: could not load pg_hba.conf’

      I subsequently read the docs & Googled the problem but tried switching between md5 & trust but it hasn’t alleviated the problem. It still doesn’t start…

      Reply
    2. After spending a couple of hours trying to start the server, I cut my losses & removed it with yum & rm’d the relevant directories.

      I then re-installed it, edited the ‘/var/lib/pgsql/9.2/data/postgresql.conf’ file as above but left the ‘/var/lib/pgsql/9.2/data/pg_hba.conf’ file alone (this was the one that had caused the problems).

      I then, as the postgres user, ran ‘/usr/pgsql-9.2/bin/pg_ctl -D /var/lib/pgsql/9.2/data -l logfile start’ & the server this time started & I was able to create the test db.

      There are a lot of posts on Google concerning the ‘pg_hba.conf’ file & a fair few had problems similar to mine so I’ll have to the RTFM a little more.

      Sorry for the noise…

      Reply
      • wow man, thanks for this noise. I was having serious troubles until you gave that command

        usr/pgsql-9.2/bin/pg_ctl -D /var/lib/pgsql/9.2/data -l logfile start

        Thanks to the op as well! Very helpful post.

        Reply
    3. Thank you so much for this!!!!

      Reply
    4. Hi!! First Thanx for the post.
      So, I’m using Fedora 17 x64 and I ran every command in this post. But I stoped sn

      Systemclt start postgresql-9.2 server
      It’s giving me this error on
      systemclt status

      http://pastebin.com/S4HG7MUE
      Could You please help me/?

      Reply
    5. *Correcting*

      Hi!! First Thanx for the post.
      So, I’m using Fedora 17 x64 and I ran every command in this post. But I stoped sn
      Systemclt start postgresql-9.2.service
      It’s giving me this error on
      systemclt status
      http://pastebin.com/S4HG7MUE
      Could You please help me/?

      Reply
      • Hi Vinny,

        Could you post more info from your postgresql log files?

        Reply
    6. I have a problem with “Initialize Cluster with initdb Command” step. When I enter su - postgres -c /usr/pgsql-9.2/bin/initdb I don’t know the password for postgres user. I’m on Fedora 18 64bit, btw.

      Reply
      • Hi Arnes,

        Updated my comment:

        Simply run that command as root user. It will ask postgres password if you run it as normal user.

        Is it working then?

        Reply
        • I’ve set my postgres user’s password with root access. It’s working now.

          Reply
          • Hi Arnes,

            Okay, nice to hear that you got it working!

            Reply
      • Hi Enelar,

        Looks nice, thanks! :)

        Reply
        • Step forward through 2.4.
          Further steps are too `personal`;)

          GL, and thanks for your manual – used it more than 12 times.

          Reply
    7. Thank you very much. Very simple.

      Reply
    8. Hi JR.

      little bit confuse in

      2.3 Set PostgreSQL Permissions
      # Local networks
      host all all xx.xx.xx.xx/xx md5
      # Example
      host all all 10.20.4.0/24 md5
      # Example 2
      host test testuser 127.0.0.1/32 md5

      can you pls. explain your example, I really need to know it.
      shoul I change my own settings at /var/lib/pgsql/9.2/data/pg_hba.conf..
      mine is look like:

      # TYPE DATABASE USER ADDRESS METHOD

      # “local” is for Unix domain socket connections only
      local all all trust
      # IPv4 local connections:
      host all all 127.0.0.1/32 trust
      # IPv6 local connections:
      host all all ::1/128 trust
      # Allow replication connections from localhost, by a user with the
      # replication privilege.
      #local replication postgres trust
      #host replication postgres 127.0.0.1/32 trust
      #host replication postgres ::1/128 trust

      thank you JR.

      Reply
      • Hi labradorg13,

        Do you want to use your PostgreSQL installation just locally (from localhost)?

        Reply
        • Hi JR, I want to use for local only.

          Reply
          • Hi labradorg13,

            Okay, then your config is enough.

            If you want to enable users password when connection to PostgreSQL DB, then change trust to md5 and create users with passwords. :)

            Reply
            • Hi, JR after following you said that my config is enough.
              I completely follow the steps from 2.3 Set PostgreSQL Permissions up to 3.3 Restart Iptables Firewall but at the last step 3.4 Test remote connection…
              I got the error …. [[email protected] rpidavao]# psql -h dbserver_name_or_ip_address -U testuser -W test
              Password for user testuser:
              psql: could not translate host name “dbserver_name_or_ip_address” to address: Name or service not known
              [[email protected] rpidavao]#

              I follow your steps in creating 2.5 Create Test Database and Create New User with-out any errors.

              Reply
              • Hi again labradorg13,

                You have to use real server name or ip address, this should be on your case localhost or 127.0.0.1.

                Reply
    9. I could not make it work, so I followed another tutorial:
      fedora-fr
      There is just one line to change:
      the pg_hba.conf file is located at /var/lib/pgsql/data/pg_hba.conf

      Reply
      • Hi ludovic,

        I updated this guide also working with Fedora 19, just tested this on Fedora 19 and it worked as it should be.

        Reply
    10. Thanks. Works like a charm. Best of a kind,

      Reply
    11. When i execute this command. Postgresql doesn’t start
      systemctl start postgresql-9.2.service
      Following error is throw

      Job for postgresql-9.2.service failed. See ‘systemctl status postgresql-9.2.service’ and ‘journalctl -xn’ for details.

      Fedora 19
      I have done all step above as mention above.

      Reply
      • This is a security issue. I have solved this problem by doing

        # chmod -R 700 /var/lib/pgsql/data
        # chown -R postgres /var/lib/pgsql/data

        Reply
    12. Hello, want to ask when i service postgresql-9.3 initdb the result is “Initializing database: [FAILED]”

      any solving problem for this one?

      Reply
    13. Thanks, very useful!

      Reply
1 2 3 4

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