Installation

Iinital Database Setup

Basic

  • Install postgresql database
    apt install postgresql
  • Change to database user
    su - postgres
  • Create Smart Business Context Services main database
    createdb sbcs
  • Connect to created database
    psql --db sbcs
  • Create new user and set rights. Exit afterwards (e.g. using Ctrl+d)
    CREATE USER sbcs WITH PASSWORD '3KS2AfjdnwZU9dVAk92dY7v7JeVfnoaTmffJ';
    GRANT ALL ON DATABASE sbcs TO sbcs;

Database runs on remote host

If the database does run on another machine or container:

  • Insert ip of sbcs container into /etc/postgresql/10/main/pg_hba.conf
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            md5     #localhost
    host    all             all             192.168.1.1/24       trust  #ip of sbcs host
  • Add IPs to listen_addresses in psql configuration at /etc/postgresql/10/main/postgresql.conf (or * to listen on every IP)
    listen_addresses = '*'
  • Restart database afterwards
    /etc/init.d/postgresql restart