Installing and configuring PostgreSQL (Windows)

March 5, 2024

ID 192976

To install and configure PostgreSQL:

  1. Download and install PostgreSQL.

    Visit https://www.enterprisedb.com/downloads/postgres-postgresql-downloads to see a list of supported operating systems and download the installer.

  2. Open the postgresql.conf configuration file. This file is located at %postgresql_dir%\data. Here %postgresql_dir% (for example, C:\Program Files\PostgreSQL\11) is the folder that PostgreSQL was installed in.
  3. Specify the IP address that Kaspersky Scan Engine must use to connect to PostgreSQL in the listen_addresses setting of postgresql.conf.
  4. Specify the port on which the PostgreSQL is to listen for connections from Kaspersky Scan Engine in the port setting of postgresql.conf.
  5. For PostgreSQL Version 13 or later, find the following line in postgresql.conf:

    password_encryption = md5 # md5 or scram-sha-256

    If the password encryption method specified on this line is other than md5, change it to md5.

  6. Save and close postgresql.conf.
  7. Open the pg_hba.conf configuration file. This file is located in the same folder as postgresql.conf.
  8. Make sure that PostgreSQL requires an MD5-encrypted password for authentication from all of its clients. Find the following line in pg_hba.conf:

    host all all 127.0.0.1/32 md5

    If the authentication method specified on this line is other than md5, change it to md5.

  9. If PostgreSQL and Kaspersky Scan Engine are installed on different computers, add the following line to pg_hba.conf:

    host all all %IP%/32 md5

    Here %IP% is the IP address of the computer on which Kaspersky Scan Engine is installed.

  10. Save and close pg_hba.conf.
  11. Restart PostgreSQL by running the following commands from the command line:

    sc stop postgresql-x64-11

    sc start postgresql-x64-11

  12. If step 5 was performed, you have to update the password for the superuser on the computer that has PostgreSQL installed. The default user is postgres. You can use either the psql utility or pgAdmin to perform this action. If you use the psql utility, specify a space character and a user name after the -U parameter, as follows: psql -U postgres

    Update the password for the superuser:

    ALTER ROLE username WITH PASSWORD 'your password';

You can now install Kaspersky Scan Engine GUI.

To install Kaspersky Scan Engine GUI, you need a PostgreSQL user that has permissions for creating new databases and users. You can use the postgres user for that, or create a new user.

After installing PostgreSQL, you can proceed to section "Installation using installer (Windows)" or "Manual installation (Windows)".

All data is stored in a single database called kavebase. Kaspersky Scan Engine does not use any other databases.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.