Version

    PostgreSQL

    Creating Database

    CloverDX Server Setup

    CloverDX Server supports PostgreSQL 14.x as its backend database. We test against PostgreSQL 14.4 and, therefore, recommend this version. PostgreSQL 15.x is currently not supported.

    Creating Database

    Advanced users can create their own table space

    We are going to create a database for CloverDX to use a 'user group' role which will own the database and a user role which we will add to the user group. This user role will be then used by the Server to access the database.

    Database name: clover_db

    UserGroup: cloverdx

    User: clover

    Password: clover

    1. Optionally, you can create a new tablespace

    2. Connect as postgres (default admin) to the default DB postgres and execute the following commands:

      CREATE ROLE cloverdx NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT NOLOGIN;
      CREATE ROLE clover NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN ENCRYPTED PASSWORD 'clover';
      GRANT cloverdx TO clover;
      CREATE DATABASE clover_db;
      GRANT ALL ON DATABASE clover_db TO cloverdx;
      REVOKE ALL ON DATABASE clover_db FROM public;

    To separate the database into its own tablespace, create a tablespace before creating the database.

    and use the following command to create the database:

    CREATE DATABASE clover_db WITH OWNER cloverdx TABLESPACE tablespace_name;

    For more information, see the PostgreSQL documentation.

    CloverDX Server Setup

    Example of a properties file configuration:

    jdbc.driverClassName=org.postgresql.Driver
    jdbc.url=jdbc:postgresql://localhost/clover_db?charSet=UTF-8
    jdbc.username=clover
    jdbc.password=clover
    jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect

    Add a JDBC 4 compliant driver on the classpath. A JDBC driver which doesn’t meet the JDBC 4 specifications won’t work properly.

    The JDBC driver for PostgreSQL can be downloaded from the official PostgreSQL page.

    Example for Apache Tomcat: place the libraries into the TOMCAT/lib directory.

    arrow Continue with: Encrypted JNDI or Activation