https://docs.zoneminder.ru/ru/latest/installationguide/debian.html#debian-11-bullseye
Установка компонентов сервера видеонаблюдения:
Код: Выделить всё
apt-get install zoneminder zoneminder-api MySQL-server apache2-mod_php8.3 apache2-cgi-bin php8.3-cgi php8.3-sockets -ymcedit /etc/my.cnf.d/server.cnf
Код: Выделить всё
[mysqld]
default_time_zone = '+03:00'Код: Выделить всё
systemctl enable mysqld.service --nowКод: Выделить всё
mysql
CREATE DATABASE zm;
source /usr/share/zoneminder/db/zm_create.sql;
CREATE USER 'zmuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Pass';
GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost';
FLUSH PRIVILEGES;
exitmcedit /etc/httpd2/conf/sites-available/zoneminder.conf
Код: Выделить всё
<VirtualHost *:80>
ServerName localhost
# Веб интерфейс ZoneMinder
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
Options FollowSymLinks
AllowOverride All
Require all granted
php_value short_open_tag 1
DirectoryIndex index.php
</Directory>
# CGI скрипты - все возможные варианты (на случай если не будет отображаться изображение в консоли)
ScriptAlias /cgi-bin /usr/lib/zoneminder/cgi-bin
ScriptAlias /cgi-bin-zm /usr/lib/zoneminder/cgi-bin
ScriptAlias /zm/cgi-bin-zm /usr/lib/zoneminder/cgi-bin
ScriptAlias /zm/cgi-bin /usr/lib/zoneminder/cgi-bin
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI
Require all granted
SetHandler cgi-script
php_value short_open_tag 1
</Directory>
ErrorLog /var/log/httpd2/zm_error.log
CustomLog /var/log/httpd2/zm_access.log combined
</VirtualHost>Код: Выделить всё
a2ensite zoneminder
a2enmod mod_php8.3
a2enmod cgi
a2enmod rewrite
a2enmod headersmcedit /etc/php/8.3/apache2-mod_php/php.ini
Код: Выделить всё
date.timezone = "Europe/Moscow"mcedit /etc/php/8.3/cli/php.ini
Код: Выделить всё
extension=sockets.soКод: Выделить всё
chown -R apache2:_webserver /usr/share/zoneminder/
chown -R apache2:_webserver /var/cache/zoneminder/
chmod -R 755 /var/cache/zoneminder/Код: Выделить всё
usermod -a -G video apache2mcedit /etc/zm/zm.conf
Код: Выделить всё
ZM_DB_TYPE=mysql
ZM_DB_HOST=localhost
ZM_DB_NAME=zm
ZM_DB_USER=zmuser
ZM_DB_PASS=Pass
Код: Выделить всё
md /etc/systemd/system/zoneminder.service.d/Код: Выделить всё
[Service]
Restart=always
RestartSec=10
StartLimitIntervalSec=0Код: Выделить всё
systemctl enable --now httpd2 zoneminder
rebootПодключимся к серверу и добавим камеру (в моём случае это RVi-1NCD2379):
http://АйПиАдресСервера/zm/