Installing and configuring PostgreSQL (Linux)

Kaspersky Scan Engine GUI requires PostgreSQL 10.7 or later. The following procedure covers installation and configuration of PostgreSQL 10.7. The procedure for a later version may vary.

To install and configure PostgreSQL:

  1. Download and install PostgreSQL.

    You can install PostgreSQL in one of the following ways:

  2. Open the postgresql.conf configuration file. The location of this file varies depending on your operating system:
    • In Debian-based Linux distributions postgresql.conf is located at /etc/postgresql/10/main/.
    • In RedHat-based Linux distributions postgresql.conf is located at /var/lib/pgsql/data/.

    If you use another operating system, the location of postgresql.conf may be different.

  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. Save and close postgresql.conf.
  6. Open the pg_hba.conf configuration file. This file is located in the same directory as postgresql.conf.
  7. Specify that PostgreSQL must require an MD5-encrypted password for authentication from all of its clients:
    1. Find the following line in pg_hba.conf:

      host all all 127.0.0.1/32 peer

    2. Change this line to:

      host all all 127.0.0.1/32 md5

    If the pg_hba.conf configuration file does not contain the host all all 127.0.0.1/32 peer line, you have to change the host all all 127.0.0.1/32 ident line.

  8. 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.

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

    service postgresql restart

  11. Set the password for the default PostgreSQL user.

    During installation PostgreSQL creates a superuser called postgres. By default, this user does not a have a password.

    To set the password for the postgres user:

    1. From the command line, change the correct user to the postgres user:

      su postgres

    2. Under the postgres user account, start the psql utility by running the following command in the command line:

      psql

    3. In psql, change the password of the postgres user by running the following command:

      alter user postgres with password '%PASSWORD%';

      Here %PASSWORD% is the new password for the postgres user.

    4. Quit the psql utility by running the following command in psql:

      \q

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 and setting the password for the postgres user, you can proceed to section "Automatic installation (Linux)" or "Manual installation (Linux)".

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

Page top