Configuring NiFi Registry Metadata Stores in PostgreSQL

Learn how to configure a PostgreSQL database for use with NiFi Registry.

Postgres provides the option to use an externally located database that supports high availability.

You have installed a PostgreSQL database. For details, see Installing PostgreSQL.
  1. Download the Postgres JDBC driver and place it somewhere accessible to NiFi Registry:
    /path/to/drivers/postgresql-42.2.2.jar
  2. Create a database inside Postgres:
    createdb nifireg
  3. Create a database user and grant privileges:
    psql nifireg
    CREATE USER nifireg WITH PASSWORD 'changeme';
    GRANT ALL PRIVILEGES ON DATABASE nifireg to nifireg;
    \q
  4. After NiFi Registry service is installed, configure the database properties in Cloudera Manager:
    • NiFi Registry JDBC Url (nifi.registry.db.url)jdbc:postgresql://<POSTGRES-HOSTNAME>/nifireg
    • NiFi Registry JDBC Driver (nifi.registry.db.driver.class) – org.postgresql.Driver
    • NiFi Registry H2 directory storage location (nifi.registry.db.driver.directory) – /path/to/drivers
    • NiFi Registry Database Username (nifi.registry.db.username) – nifireg
    • NiFi Registry Database Password (nifi.registry.db.password) – changeme

When you have completed the NiFi Registry database configuration, move on to installing Cloudera Manager and your CDP Private Cloud Base Cluster.