View on GitHub

HPC configuration management using Puppet 5

CHPC conference workshop - December 2017

Install PostgreSQL 9.6

Previous | Home | Next

  1. Install PostgreSQL 9.6 from the PGDG repository. CentOS 7 ships with PostgreSQL 9.2. The PGDG repository provides version 9.6.
    sudo yum install postgresql96-{server,contrib}

  2. Initialise the database.
    sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb
  3. Set up authentication
    1. Allow MD5 authentication from localhost
      sudo sed -ri 's/^(local.*)peer/\1md5/;s/^(host.*)ident/\1md5/' /var/lib/pgsql/9.6/data/pg_hba.conf
    2. Trust the ‘postgres’ user
      sudo sed -i '/^local/ilocal\tall\t\tpostgres\t\t\t\ttrust' /var/lib/pgsql/9.6/data/pg_hba.conf

  4. Enable and start the service.
    sudo systemctl enable postgresql-9.6
    sudo systemctl start postgresql-9.6

Previous | Home | Next