Manual installation

Manual installation means performing all stages of software installation manually without using automatic scripts.

This method allows to flexibly configure each component and install components on different servers independently of each other.

Manual installation involves a series of steps, such as preparing the environment, uploading the necessary files, configuring applications, and verifying the functionality of the installed components.

This method is recommended for experienced administrators, as it requires knowledge of the characteristics of each component and an understanding of the dependencies between them.

Preparation for installation

Setting the time zone

When installing Ubuntu-22.04.5, it is not suggested to specify the time zone (UTC time is set by default). The time zone must be set manually (for the video archive, access calendars, etc. to work correctly), for example:

sudo timedatectl set-timezone Asia/Novosibirsk

Using the city of Novosibirsk as an example: timedatectl list-timezones | grep "Novosibirsk"

Operating system update

Before starting the installation, it is necessary to update the operating system:

sudo apt update && sudo apt upgrade -y

Downloading installation files

wget --no-check-certificate https://archive.eltex-co.ru/evi-raw/evi-1.5.0/evi-1.5.0_ubuntu-22.04.tar
tar -xvf evi-1.5.0_ubuntu-22.04.tar

Installing the database

PackageDescription
postgresql-17
The database is used in EVI services
clickhouse-server
The database is used in EVI services
clickhouse-client
Client for connecting to the ClickHouse database
libpq5
Library for interaction between EVI services and databases

Postgresql database

The minimum version of PostgreSQL is 17.

All services use one database to operate.

It is recommended to place the database next to evi-core and evi-scud.

To install PostgreSQL 17, it is necessary to run the following commands in the server terminal:

sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --yes --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
sudo apt update
sudo apt install -y postgresql-17

Creating a core database with the core user in PostgreSQL.

If you are migrating databases, this step is not applicable.

To create a database, run the following commands:

sudo -u postgres createuser --interactive

Enter name of role to add: core

Shall the new role be a superuser? (y/n) y

sudo -u postgres psql
CREATE DATABASE core;
ALTER USER core WITH PASSWORD 'core';
ALTER USER core WITH SUPERUSER;
\quit

ClickHouse database

To install ClickHouse, it is necessary to run the following commands in the server terminal:

sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | sudo gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg
ARCH=$(dpkg --print-architecture)
echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg arch=${ARCH}] https://packages.clickhouse.com/deb stable main" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt update

When installing clickhouse-server, a password for the default user will be requested (Set up the password for the default user).

Default password used in EVI documentation is core.

sudo apt-get install -y clickhouse-server clickhouse-client
sudo service clickhouse-server start

Creating a user named core with the password "core" in the ClickHouse database:

clickhouse-client --user=default --password=core --query="CREATE USER core IDENTIFIED WITH sha256_password BY 'core'" --query="GRANT CURRENT GRANTS on *.* TO core WITH GRANT OPTION"

Installing required dependencies

Each of the modules (evi-core, evi-scud, evi-live, evi-archive, evi-analyzer) requires the libpq5 package (>= 17.2).

If services are installed on different servers, libpq5 must be installed on each of them.

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --yes --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
sudo apt update
sudo apt install libpq5

Installing the Core module

Evi-core — core of the platform designed for configuring modules

General requirements for modules

Requirements for the platform core

Below is the minimum configuration required to run the evi-core platform core and PACS module on a single server:

OSCPURAMSDDHDDLAN
Ubuntu 22.042 cores 64-bit x864 GB100 GB100 GB100 Mbps

Installing the Core module

To install the system core, run the following command:

sudo dpkg -i evi-core_1.5.*.deb
sudo apt-get install -f

Installing the web interface module

EVI Core Web — graphical web interface for system management.

Requirements for the web interface module

The Angie web server must be installed for the web interface module to work.

To install the web server, run the following commands:

sudo apt install ca-certificates curl
sudo curl -o /etc/apt/trusted.gpg.d/angie-signing.gpg \
            https://angie.software/keys/angie-signing.gpg
echo "deb https://download.angie.software/angie/$(. /etc/os-release && echo "$ID/$VERSION_ID $VERSION_CODENAME") main" \
    | sudo tee /etc/apt/sources.list.d/angie.list > /dev/null
sudo apt update
sudo apt-get install -y angie

Installing the web interface module

To install the web interface module, run the following command:

sudo dpkg -i evi-core-web_1.5.*.deb
sudo apt install -f

Installing the PACS module

EVI Scud — access control and management system module designed to organize access control in an organization.

Requirements for the PACS module

The module requires an IPA-ER-020 access control system controller to operate.

The controller firmware version must be 2.3.0 build 52 or higher.

Installation of the PACS module

To install the PACS module, run the following command:

sudo dpkg -i evi-scud_1.5.*.deb
sudo apt install -f

Installing the Video surveillance module

EVI Perimeter — combination of video surveillance modules (evi-live, evi-archive, evi-analyzer) designed to receive video streams from cameras and store them in an archive.

PackageDescription
evi-live
Модуль для взаимодействия с камерами видеонаблюдения для платформы EVI
evi-archive
Модуль для записи архивов с камер для платформы EVI
evi-analyzer
Модуль детектора движения для платформы EVI

Requirements for the Video surveillance module

The module requires cameras that support RTSP connection.

Preliminary steps

In the evi-live service configuration file, located at /opt/evi-live/evi-live.conf, the extern_host parameter must specify an IP address or domain name that is accessible to users on your local network. 

Otherwise, viewing video from the cameras will be impossible.

In case a domain name is set instead of an IP address, video may stop working in the Firefox browser.

To automatically set the address in the configuration file after installation, perform the following steps in the server console:

export EVI_LIVE_EXTERN_HOST=$(ip -br -4 a show $(ip ro get fibmatch 0.0.0.1 | grep -o "dev [^ ]\+") | grep -o "[^ \.]\+\.[^/]\+")
echo $EVI_LIVE_EXTERN_HOST

In the console, the IP address of the server's network interface will be displayed, for example, 192.168.50.15.

To verify the correctness of the IP address, execute the following command:

ip -br a

The address must match the network interface.

lo               UNKNOWN        127.0.0.1/8 ::1/128 
eno1             UP             192.168.50.15/24 metric 100 fe80::3eec:efff:fea0:9396/64

Then proceed to install video surveillance. The extern_host variable will be set automatically in the configuration file.

Installation of the Video surveillance module

To install the Video surveillance module, run the following command:

sudo -E dpkg -i evi-live_1.5.*.deb evi-archive_1.5.*.deb evi-analyzer_1.5.*.deb
sudo apt install -f

Verifying the variable after installation:

cat /opt/evi-live/evi-live.conf | grep "extern_host"

The console will display the following:

extern_host=192.168.50.15                # External or proxy address (ENV: EVILIVE_GLOBAL_EXTERN_HOST)

Installing the Video analytics module

EVI Analytics — video analytics module designed to detect, recognize, count, and track objects according to models.

It is recommended to update the system core before installing the video driver.

Before starting, it is necessary to read the requirements for the Video analytics module in the EVI Platform system requirements section.

Requirements for the Video analytics module

The video analytics system requires a video card.

To operate in a virtual environment, the hypervisor must support hardware passthrough of PCI/PCI-E devices, including the video card.

Compatibility with virtualization does not ensure stable operation of the video analytics module.

A discrete graphics card is required for the module to function. The minimum configuration for operation is listed below:

OSGPUSERIESVRAMDRIVER
Ubuntu 22.04NVIDIAQuadro or RTX8 GB545

Example of installed core and driver versions

There may be problems installing the driver due to the Linux kernel. Examples of working options are shown below:

OSKernelDriver
Ubuntu 22.04.4 LTSGNU/Linux 6.5.0-44-generic x86_64NVIDIA-SMI 545.29.06
Ubuntu 22.04.4 LTS GNU/Linux 6.5.0-45-generic x86_64NVIDIA-SMI 575.64.05

Manual installation of docker and drivers

It is recommended to use the latest driver available in the OS repository.

To work with the video card, it is necessary to install the driver:

sudo apt install -yfqq nvidia-driver-575

The next step is to install docker for working with the analytics container and nvidia-docker2 for working with the graphics card:

sudo apt-get update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl https://get.docker.com | sh \
  && sudo systemctl --now enable docker
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install docker-ce docker-compose nvidia-docker2
sudo systemctl restart docker

Add a user to the docker group:

sudo usermod -aG docker $(whoami)

A server reboot is required.

sudo reboot

It is necessary to check whether the driver is running in the system after installation:

nvidia-smi

An error when executing the nvidia-smi command indicates that the video driver failed to start and/or there is no discrete graphics card. Video analytics cannot be launched without a working NVIDIA driver.


+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.144.03             Driver Version: 575.144.03     CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3080        Off |   00000000:01:00.0 Off |                  N/A |
|  0%   41C    P2            113W /  370W |    3902MiB /  10240MiB |      5%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A   2144100      C   tritonserver                                 1296MiB |
|    0   N/A  N/A   2144155      C   tritonserver                                 1296MiB |
|    0   N/A  N/A   2144163      C   tritonserver                                 1296MiB |
+-----------------------------------------------------------------------------------------+

Configuring database access for container connection

Before starting the configuration, it is necessary to stop the EVI services.

sudo systemctl stop evi-core.service evi-scud.service evi-live.service evi-archive.service evi-analyzer.service

It is necessary to open access for connecting the analytics container to the database.

/etc/postgresql/17/main/pg_hba.conf

Add the following line to the IPv4 local connections section and save the file.

Since containers get IP addresses from the 172.16.0.0/12 subnet by default, it is necessary to specify it.

# IPv4 local connections:
host    all             all             127.0.0.1/32          scram-sha-256
host    all             all             172.16.0.0/12         md5

Open the database configuration file. Remove the hash symbol (#) to activate the listen_addresses parameter and specify the server's IP address in it. Then save the changes to the file.

/etc/postgresql/17/main/postgresql.conf
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
                                        
# - Connection Settings -

#listen_addresses = 'localhost'         # what IP address(es) to listen on;
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
                                        
# - Connection Settings -

listen_addresses = 'localhost, 192.168.1.10'         # what IP address(es) to listen on;

To apply the changes, restart the postgresql database service:

sudo systemctl restart postgresql
sudo systemctl start evi-core.service evi-scud.service evi-live.service evi-archive.service evi-analyzer.service

Loading the image and starting the evi-analytics container

Analytics images have a large file size, so they may take some time to load.

After configuring access to the database, it is necessary to upload the evi-analytics_1.5.0.sh script to the analytics server:

wget --no-check-certificate https://archive.eltex-co.ru/evi-raw/evi-1.5.0/evi-analytics_1.5.0.sh
bash evi-analytics_1.5.0.sh EFNRS_DB_HOST="IP-ADDRESS OF YOUR DATABASE"
bash evi-analytics_1.5.0.sh EFNRS_DB_HOST="192.168.1.10"

Performance verification

docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Status}}"

CONTAINER ID   NAMES                                                    STATUS
f01deee7d6a5   user-triton1-1                                       Up 23 hours
d70d9e7004ac   user-triton3-1                                       Up 23 hours
c011105320e9   user-triton2-1                                       Up 23 hours
d17d6261648f   user-evi-analytics-haproxy-1            Up 23 hours
fa2db6812f3b    user-evi-analytics-1                             Up 23 hours

Installation checklist

Performance verification

sudo systemctl is-active evi-core.service evi-scud.service evi-live.service evi-archive.service evi-analyzer.service

All components must be active in the output:

active
active
active
active
active