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

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

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

1 2 3 4
    1. Dear all, when i installed and create user and database and also connect that database and user from my front end application. and when i create second user and database then postgres asking password. I never set password for postgres user and database. and why postgres asking for password?

      • Hi Ashwin,

        Could you post/check what you have in your pg_hba.conf file(s)?

        Maybe you use trust for other db and example md5 for other db?

    2. Problem has been resolved, I have replaced trust instead md5 for local, like
      local all all trust
      then postgres not asking for password…

      • Excellent! Nice to hear that you got it working!

    3. Great and complete tutorial! I did the install in 5 minutes. Thanks for that.
      I also like to create a user with createuser:
      As postgres user, do:

      createuser -d -P testuser

      Then as this testuser, you can create the db:

      createdb -E Unicode test

    4. great tutorial. thanks a lot

    5. Excellent as usual (Centos 6.5). Only suggestion would be a concrete example for pg_hba.conf:

      host all all trust

      For those on ‘safe’ networks and/or will worry about security later.

    6. … go to enterprise db site ,
      Download oss version , chmod to execute , execute … that ‘s all
      Wat else ?

      PS by the way , you have pgadmin installed

      fed 20 x 64

      PPS : i’m just switching from win7 to linux , happy to find at least a software that i can install just with a “click”

    7. oups… i mean : what else (sic)

    8. Note: using centos 6.6

      the command `su – postgres -c /usr/pgsql-9.4/bin/initdb` creates the data folder at the same level as 9.4 folder. And inside 9.4 exists a “data” folder but empty.
      To remedy this I moved the file inside 9.4 but afterwords doing a psql inside bash raised me this error: psql: symbol lookup error: psql: undefined symbol: PQconnectdbParams

    9. I had some troubles installing and enabling postgres service. And I got this error:
      sudo systemctl start postgresql-9.4.service
      sudo journalctl -xn
      “/var/lib/pgsql/9.4/data/” is missing or empty.

      Then I’ve runned the following command with the -D argument and simple quotes at whole command:
      # su – postgres -c ‘/usr/pgsql-9.4/bin/initdb -D /var/lib/pgsql/9.4/data/’

      Now that’s fine.

    10. Please the `su` at the beginning.

      Else you’ll get weird Authentication errors.

      • Hi crazywizard,

        Check step 1.1 Change root user.

    11. The command firewall-cmd --permanent --zone=public --add --port=5432/tcpshould be:firewall-cmd –permanent –zone=public –add-port=5432/tcp

      Also, changes to the firewall can be made active using:firewall-cmd –reload

      • Hi DK,

        Thanks. I updated this guide.

        Yes, reload works too. No problems.

    12. Very good guide, thanks!
      I’d suggest you to add a few things for completeness:

      2.2.2 Enable SSL with a self-signed certificate:

      sudo su – postgres
      cd /var/lib/pgsql/9.4/data/
      openssl req -newkey rsa:2048 -nodes -keyout server.key -x509 -days 365 -out server.crt

      Open /var/lib/pgsql/9.4/data/postgresql.conf file, and add/uncomment/modify following:

      ssl = on

      And to create a user, I’d suggest to use

      createuser -sePE

      instead of executing that long SQL sentence


    13. Can you also explain how to install postgis in a similar manner

    14. How to install postgresql on fedora 24?

1 2 3 4

Leave a Reply to JR Cancel 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.