Getting started in Linux and FreeBSD

Before starting to use the KAV SDK in your Linux-based solution, several preliminary steps should be performed.

If you want to use KAV SDK in HTTP mode, see section "Getting started with KAV SDK in HTTP Mode".

To get the KAV SDK ready for use:

  1. Verify that your computer meets the system requirements listed in section "System requirements".

    You must use the same architecture for KAV SDK as the target platform architecture when you deploy KAV SDK. For example, you must use a 64-bit version of KAV SDK to deploy it on a 64-bit version of operating system. Installing a 32-bit version of KAV SDK on a 64-bit version of operating system is not supported.

  2. Optionally, remove the UniArc.ppl file from the KAV SDK package contents.

    You might want not to use this module in order to decrease RAM usage. For more information, see section "Disabling the UniArc plugin".

  3. Extract the package contents into the folder where your application will use it (the SDK folder).
  4. Verify that license KEY and KLI files available in the SDK folder.

    The KAV SDK is delivered together with license files that grant you a permission to use the library for until the expiration date, a date when the license period expires. To ensure uninterrupted protection, it is recommended that you renew the license and obtain the new license files before the expiration date. For more details, see section "Licensing".

  5. Install the Updater SDK.

    The Updater SDK including the documentation on the Updater API is delivered as a separate package.

    Please install KAV SDK and Updater SDK to separate locations.

  6. Specify a location of the anti-virus database to be used by the KAV Engine. Do one of the following:
    • Leave the default path: %SDK_folder%/bin/bases

      where %SDK_folder% is defined in the step 3.

    • Create a directory with the different path.

    This directory should be specified later, at the KAV SDK initialization stage. For more information, see section "Initializing".

  7. Load anti-virus database to the location specified in the previous step. Do one of the following:
    • Load the latest anti-virus database by using the Updater.
    • Leave anti-virus database delivered in the KAV SDK package.
  8. Navigate to the %SDK_folder%/include folder where %SDK_folder% is defined in the step 3.
  9. Include the following files into your application project:
    • sdk8_unix_interface.h
    • kave8_def.h
    • istream.h
    • types.h

The KAV SDK is ready for use.

Some malware (for example, Sinowal trojan) can be removed only if all components of the anti-virus database are present.

Preparing environment settings

Specify language settings and set UTF-8 locale for your language and country:

user@host ~ $ cat ~/.login_conf

me:\

:charset=UTF-8:\

:lang=en_US.UTF-8

:\ :setenv=LC_COLLATE=C:

Restart any running copy of KAV SDK. The new instance will run on the new UTF8-enabled locale settings.

Configure environment variables. At a point of launching the application which is using the KAV SDK, the path to the PPL files should be defined for the LD_LIBRARY_PATH and KL_PLUGINS_PATH environment variables. This can be done, for example, by using shell script in the following way:

#! /bin/sh

KL_PLUGINS_PATH=$PWD/../ppl

LD_LIBRARY_PATH=$PWD/../LIB:$KL_PLUGINS_PATH:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH KL_PLUGINS_PATH

If you use dlopen() system call to load the SDK, please be sure to specify RTLD_NOW binding flag in the argument of dlopen(). Do not use lazy binding to avoid initialization failures at the time when you call kaveInitialize.

Page top