Manual installation (Windows)

This section describes how to manually install Kaspersky Scan Engine on Windows systems.

To install Kaspersky Scan Engine manually:

  1. Make sure that you have administrator privileges.
  2. Create the C:\Program Files\Kaspersky Lab\ScanEngine folder. This folder is called %service_dir% in this Help document.
  3. Unpack the distribution kit contents to the %service_dir% folder on your system.
  4. Read the End User License Agreement (EULA) for Kaspersky Scan Engine. The EULA is located at %service_dir%\doc\license.txt.

    If you agree to the terms of the EULA, proceed to the next step. If you decline the terms of the EULA, cancel the installation.

  5. Open file %service_dir%\bin\klScanEngineUI.xml.
  6. Accept the EULA. Change <Common>rejected</Common> to <Common>accepted</Common> in the klScanEngineUI.xml file.
  7. If you want to use Kaspersky Security Network (KSN), read the EULA for KSN and the Privacy Policy. This EULA is also located at %service_dir%\doc\ksn_license.txt and contains the link to the Privacy Policy.

    If you agree to the terms of the EULA for KSN and the Privacy Policy, proceed to the next step. If you decline the terms of the EULA for KSN or the Privacy Policy, proceed to step 9.

  8. Accept the EULA for KSN. Change <KSN>rejected</KSN> to <KSN>accepted</KSN> in klScanEngineUI.xml.
  9. Save and close %service_dir%\bin\klScanEngineUI.xml.
  10. Open file %service_dir%\bin\kavhttpd.xml.
  11. At the BasesPath and the TempPath element specify the full path to the %service_dir%\bin\bases directory and to the directory that contains temporary files used by Kaspersky Scan Engine, respectively. Save and close the file.
  12. If you want Kaspersky Scan Engine to start automatically on system bootup, do the following:
    1. In Windows, open a Command Prompt window as Administrator.
    2. Run the following command:

    sc create "Kaspersky ScanEngine" binpath= "%service_dir%\bin\kavhttpd.exe -c %service_dir%\bin\kavhttpd.xml" start= auto DisplayName= "Kaspersky ScanEngine"

    Note that if the full path to the configuration file contains a space character, you have to add a quote mark (") after the slash (\) mark. Example: C:\Program Files\Kaspersky Lab\ScanEngine\bin>sc create "Kaspersky ScanEngine" binpath= "C:\Program Files\Kaspersky Lab\ScanEngine\bin\kavhttpd.exe -c \"C:\Program Files\Kaspersky Lab\ScanEngine\bin\kavhttpd.xml\""

  13. Go to step 2 in section "Getting started with Kaspersky Scan Engine in HTTP mode".

Enabling Kaspersky Scan Engine GUI

To enable Kaspersky Scan Engine GUI:

  1. Make sure that you have administrator privileges.
  2. Perform the actions described in section "Installing and configuring PostgreSQL (Windows)".
  3. On the computer that has PostgreSQL installed, perform the actions listed below under a user that can create new users and databases. To perform these actions, you can use either the psql utility, or pgAdmin. If you use the psql utility, specify a space character and a user name after the -U parameter.
    1. Create a new PostgreSQL user called scanengine:

      CREATE USER scanengine;

    2. Set the password for the scanengine user:

      ALTER USER scanengine WITH PASSWORD '%PASSWORD%';

    3. Using PostgreSQL, create a database called kavebase:

      CREATE DATABASE kavebase OWNER scanengine;

    4. In the kavebase database run the queries described in %service_dir%\samples\tables.sql.

      psql -d kavebase -a -f tables.sql

  4. Open %service_dir%\bin\klScanEngineUI.xml.
  5. Change <EnableUI>false</EnableUI> to <EnableUI>true</EnableUI>.
  6. In the <ConnectionString> element, specify the address of the Kaspersky Scan Engine GUI web service in %IP%:%port% format.

    For example:

    <ConnectionString>198.51.100.0:443</ConnectionString>

  7. Specify the SSL certificate to install in the Kaspersky Scan Engine GUI web service.
    • If you already have an SSL certificate that you want to install in the Kaspersky Scan Engine GUI web service, specify the paths to your certificate and your private key:
      1. In the <SSLCertificatePath> element, specify the path to your SSL certificate.
      2. In the <SSLPrivateKeyPath> element, specify the path to your private key.
    • If you do not have an SSL certificate that you want to install in the Kaspersky Scan Engine GUI web service, generate a new one. Run the %service_dir%\tools\openssl utility as follows:

    %service_dir%\tools\openssl.exe req -x509 -nodes -days 1825 -subj /C=RU/CN="%ConnectionString%" -newkey rsa:4096 -extensions EXT -config "%service_dir%\tools\openssl.cnf" -keyout "%service_dir%\httpsrv\kl_scanengine_private.pem" -out "%service_dir%\httpsrv\kl_scanengine_cert.pem"

    Here %ConnectionString% is the value that is specified in the <ConnectionString> element. It is recommended to use the values rsa:4096 or rsa:3072 with the -newkey parameter. The minimum supported value is rsa:2048.

  8. Encrypt the user name and password of the user that you specified in step 3. Kaspersky Scan Engine will use this user name and password to connect to the kavebase database.

    To encrypt the credentials, use the kav_encrypt utility. This utility also automatically writes the encrypted user name and password to klScanEngineUI.xml. The utility is located in the %service_dir%\tools\ folder.

    Run the kav_encrypt utility with the following options:

    -d %username%:%password%

  9. In the DatabaseSettings > ConnectionString element, specify the address of the kavebase database in format %IP%:%port%.
  10. Save and close %service_dir%\bin\klScanEngineUI.xml.
  11. If you want Kaspersky Scan Engine GUI to start automatically on system bootup, do the following:
    1. Open a Command Prompt window as Administrator.
    2. Run the following command:

    sc create "Kaspersky ScanEngine UI" binpath= "%service_dir%\bin\klScanEngineUI.exe --svc" start= auto DisplayName= "Kaspersky ScanEngine UI"

  12. Start Kaspersky Scan Engine GUI

    sc start "Kaspersky ScanEngine UI"

Page top