Manual installation (Linux)
This section describes how to manually install Kaspersky Scan Engine on Linux systems.
To install Kaspersky Scan Engine manually:
- Make sure that you have root (administrator) privileges.
- Create the
/opt/kaspersky/ScanEngine
directory. This directory is called%service_dir%
in this Help document. - Unpack the distribution kit contents to the
%service_dir%
directory on your system. - Read the End User License Agreement (EULA) for Kaspersky Scan Engine. The EULA is located at
%service_dir%/doc/license.tx
t.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.
- Open file
%service_dir%/etc/klScanEngineUI.xml
. - Accept the EULA. Change
<Common>rejected</Common>
to<Common>accepted</Common>
in theklScanEngineUI.xml
file. - 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.
- Accept the EULA for KSN. Change
<KSN>rejected</KSN>
to<KSN>accepted</KSN>
inklScanEngineUI.xml
. - Save and close
%service_dir%/etc/klScanEngineUI.xml
. - Create a symbolic link to
%service_dir%/etc/klScanEngineUI.xml
from the/etc/
directory:ln -s
%service_dir%/etc/klScanEngineUI.xml /etc/klScanEngineUI.xml
- If you want to use Kaspersky Scan Engine GUI, read subsection "Enabling Kaspersky Scan Engine GUI" below.
- Make a symbolic link to the proper Kaspersky Scan Engine configuration file from the
/etc/
directory:- For HTTP mode, copy the
%service_dir%/etc/kavhttpd.xml
file to the/etc/
directory. - For ICAP mode, copy the
%service_dir%/etc/kavicapd.xml
file to the/etc/
directory.
For example, in HTTP mode you have to run the following command:
ln -s
%service_dir%/etc/kavhttpd.xml /etc/kavhttpd.xml
- For HTTP mode, copy the
- Make a symbolic link to the proper Kaspersky Scan Engine init script from the
/etc/init.d
dirctory:- For HTTP mode, copy the
%service_dir%/etc/init.d/kavhttpd
file to the/etc/init.d
directory. - For ICAP mode, copy the
%service_dir%/etc/init.d/kavicapd
file to the/etc/init.d
directory.
For example, in HTTP mode you have to run the following command:
ln -s
%service_dir%/etc/init.d/kavhttpd /etc/init.d/kavhttpd
- For HTTP mode, copy the
- If you want Kaspersky Scan Engine to start automatically on system bootup, do the following:
- Go to the
/etc/init.d/
directory. - Add the proper Kaspersky Scan Engine service to the system startup.
- For HTTP mode, run the following command:
- Red Hat-based distributions:
chkconfig --add kavhttpd
- Debian-based distributions:
update-rc.d kavhttpd defaults
- For ICAP mode, run the following command:
- Red Hat-based distributions:
chkconfig --add kavicapd
- Debian-based distributions:
update-rc.d kavicapd defaults
- For HTTP mode, run the following command:
- Go to the
- Go to the next step of your "Getting started" section:
- For HTTP mode, see step 2 in section "Getting started with Kaspersky Scan Engine in HTTP mode".
- For ICAP mode, see step 2 in section "Getting started with Kaspersky Scan Engine in ICAP mode".
Enabling Kaspersky Scan Engine GUI
To enable Kaspersky Scan Engine GUI:
- Make sure that you have root (administrator) privileges.
- Perform the actions described in section "Preparing to install Kaspersky Scan Engine GUI".
- 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.
- Create a new PostgreSQL user called
scanengine
:CREATE USER scanengine;
- Set the password for the
scanengine
user:ALTER USER scanengine WITH PASSWORD '%PASSWORD%';
- Using PostgreSQL, create a database called
kavebase
:CREATE DATABASE kavebase OWNER scanengine;
- In the
kavebase
database run the queries described in%service_dir%/samples/tables.sql
.psql -d kavebase -a -f tables.sql
- Create a new PostgreSQL user called
- Open
/etc/klScanEngineUI.xml
. - In the
<Mode>
element, specify the mode that Kaspersky Scan Engine will work in:For HTTP mode:
<Mode>httpd</Mode>
For ICAP mode:
<Mode>icap</Mode>
- Change
<EnableUI>false</EnableUI>
to<EnableUI>true</EnableUI>
. - 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>
- 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:
- In the
<SSLCertificatePath>
element, specify the path to your SSL certificate. - In the
<SSLPrivateKeyPath>
element, specify the path to your private key.
- In the
- 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:
/opt/kaspersky/ScanEngine/tools/openssl req -x509 -nodes -days 1825 -subj /C=RU/CN="%СonnectionString%" -newkey rsa:2048 -extensions EXT -config "/opt/kaspersky/ScanEngine/tools/openssl.cnf" -keyout "/opt/kaspersky/ScanEngine/httpsrv/kl_scanengine_private.pem" -out "/opt/kaspersky/ScanEngine/httpsrv/kl_scanengine_cert.pem"
Here
%СonnectionString%
is the value that is specified in the<ConnectionString>
element. - 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:
- 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/
directory.Run the kav_encrypt utility with the following options:
-d '%USERNAME%:%PASSWORD%'
- In the
DatabaseSettings > ConnectionString
element, specify the address of the kavebase database in format %IP%:%port%. - Save and close
/etc/klScanEngineUI.xml
. - Make a symbolic link to
%service_dir%/etc/init.d/klScanEngineUI
from/etc/init.d
:ln -s
%service_dir%/etc/init.d/klScanEngineUI /etc/init.d/klScanEngineUI
- If you want Kaspersky Scan Engine to start automatically on system bootup, do the following:
- Go to the
/etc/init.d/
directory. - Add the Kaspersky Scan Engine GUI service to the system startup. Run the following command:
- Red Hat-based distributions:
chkconfig --add klScanEngineUI
- Debian-based distributions:
update-rc.d klScanEngineUI defaults
- Red Hat-based distributions:
- Go to the
- Start Kaspersky Scan Engine GUI:
/etc/init.d/klScanEngineUI start