Zoneminder (Linux): Unterschied zwischen den Versionen
(→PHP) |
(→Links) |
||
(31 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 40: | Zeile 40: | ||
<pre> | <pre> | ||
sql_mode = NO_ENGINE_SUBSTITUTION | sql_mode = NO_ENGINE_SUBSTITUTION | ||
</pre> | |||
Danach MySQL-Server neu starten: | |||
<pre> | |||
sudo systemctl restart mysql | |||
</pre> | </pre> | ||
Zeile 63: | Zeile 69: | ||
sudo chown root:www-data /etc/zm/zm.conf | sudo chown root:www-data /etc/zm/zm.conf | ||
sudo chown -R www-data:www-data /usr/share/zoneminder/ | sudo chown -R www-data:www-data /usr/share/zoneminder/ | ||
</pre> | |||
Den Benutzer <code>www-data</code> zur Gruppe <code>video</code> hinzufügen: | |||
<pre> | |||
sudo adduser www-data video | |||
</pre> | |||
=== cambozola === | |||
<pre> | |||
cd /usr/src && sudo wget http://www.andywilcock.com/code/cambozola/cambozola-latest.tar.gz | |||
sudo tar -xzvf cambozola-latest.tar.gz | |||
sudo cp cambozola-0.936/dist/cambozola.jar /usr/share/zoneminder | |||
sudo chmod 775 /usr/share/zoneminder/cambozola.jar | |||
</pre> | </pre> | ||
Zeile 83: | Zeile 104: | ||
=== PHP === | === PHP === | ||
Folgende Datei | |||
<pre> | <pre> | ||
sudo vi /etc/php/7.0/apache2/php.ini | sudo vi /etc/php/7.0/apache2/php.ini | ||
</pre> | </pre> | ||
editieren und Kommentarzeichen entfernen und richtige Zeitzone setzen: | |||
<pre> | <pre> | ||
Zeile 94: | Zeile 119: | ||
date.timezone = Europe/Vienna | date.timezone = Europe/Vienna | ||
</pre> | </pre> | ||
=== Apache - Teil 2 === | |||
Die Datei <code>apache2.conf</code> | |||
<pre> | |||
sudo vi /etc/apache2/apache2.conf | |||
</pre> | |||
bearbeiten und <code>AllowOverride</code> auf <code>All</code> setzen: | |||
<pre> | |||
<Directory /usr/share> | |||
AllowOverride All | |||
Require all granted | |||
</Directory> | |||
<Directory /var/www/> | |||
Options Indexes FollowSymLinks | |||
AllowOverride All | |||
Require all granted | |||
</Directory> | |||
</pre> | |||
Die Apache-Konfigurationen neu laden: | |||
<pre> | |||
sudo systemctl reload apache2 | |||
</pre> | |||
Danach sollte das Portal bereits verfügbar sein: | |||
<pre> | |||
http://hostname_or_ip/zm | |||
</pre> | |||
=== ZoneMinder === | |||
in [http://10.0.0.120/zm/index.php?view=options&tab=paths http://10.0.0.120/zm/index.php?view=options&tab=paths] die Variable <code>PATH_ZMS</code> auf <code>/zm/cgi-bin/nph-zms</code> ändern. | |||
=== Links === | === Links === | ||
[ | [https://wiki.zoneminder.com/Raspberry_Pi_4_-_Raspbian#Install_and_Configure_Zoneminder https://wiki.zoneminder.com/Raspberry_Pi_4_-_Raspbian#Install_and_Configure_Zoneminder] | ||
[https://wiki.zoneminder.com/Ubuntu_Server_16.04_64-bit_with_Zoneminder_1.30.4_the_easy_way https://wiki.zoneminder.com/Ubuntu_Server_16.04_64-bit_with_Zoneminder_1.30.4_the_easy_way] | |||
[https://www.piprojects.net/guenstige-videoueberwachung-mit-zoneminder/ https://www.piprojects.net/guenstige-videoueberwachung-mit-zoneminder/] | |||
== Konfiguration == | == Konfiguration == | ||
=== Monitor hinzufügen === | |||
==== Parameter ==== | |||
Ich verwende eine '''D-Link DCS-7010L''', wo die Parameter [https://wiki.zoneminder.com/D-Link#DCS-7010L hier] zu finden sind. | |||
(Standard-Zugangsdaten für das Webinterface der DCS-7010L sind: | |||
'''Nutzername:''' <code>admin</code> | |||
'''Passwort:''' <code><leer></code> | |||
<pre> | |||
Source Type: Remote | |||
Remote Protocol: RTSP | |||
Remote Method: RTP/Unicast | |||
Remote Host Port: 554 | |||
Remote Host Name: <IP Address of Camera> (RTSP authentication didn't work with this method) | |||
Remote Host Path: /live1.sdp | |||
</pre> | |||
<pre> | |||
Source Type: Remote | |||
Remote Protocol: Ffmpeg | |||
Remote Host Path: rtsp://<IP Address of Camera>:554/live1.sdp | |||
Remote Host Path: rtsp://user:pass@<IP Address of Camera>:554/live1.sdp (when RTSP authentication is enabled) | |||
</pre> | |||
<pre> | |||
Source Type: Remote | |||
Remote Protocol: HTTP | |||
Remote Host Port: 80 | |||
Remote Host Name: user:pass@<IP Address of Camera> | |||
Remote Host Path: /video1.mjpg | |||
</pre> | |||
Im Webinterface der ''DCS-7010L'' unter <code>SETUP->AUDIO UND VIDEO->BENUTZERPROFIL 1</code> den Modus auf <code>MPEG4</code> ändern. | |||
=== Links === | === Links === | ||
[http://zoneminder.readthedocs.io/en/latest/userguide/gettingstarted.html http://zoneminder.readthedocs.io/en/latest/userguide/gettingstarted.html] | [http://zoneminder.readthedocs.io/en/latest/userguide/gettingstarted.html http://zoneminder.readthedocs.io/en/latest/userguide/gettingstarted.html] | ||
[ https://wiki.zoneminder.com/D-Link#DCS-7010L https://wiki.zoneminder.com/D-Link#DCS-7010L] | |||
== Probleme == | |||
<pre> | |||
2018-02-07 00:24:54.577297 web_js 1972 ERR getStreamCmdResponse stream error: Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors() ?view=watch | |||
2018-02-07 00:24:54.447549 web_php 1972 ERR Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. /usr/share/zoneminder/www/includes/functions.php 2033 | |||
2018-02-07 00:24:53.574445 zma_m2 2105 INF Wohnung: 24000 - Analysing at 20.00 fps zm_monitor.cpp 1296 | |||
2018-02-07 00:24:46.061088 zmc_m2 2095 INF Wohnung: 30000 - Capturing at 25.00 fps zm_monitor.cpp 3125 | |||
2018-02-07 00:24:42.444576 web_js 1506 ERR getStreamCmdResponse stream error: Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors() ?view=watch | |||
2018-02-07 00:24:42.299644 web_php 1506 ERR Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. /usr/share/zoneminder/www/includes/functions.php | |||
</pre> | |||
[http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc] | |||
=== Links === | |||
{{note|Noch nicht getestet}} | |||
[https://ris.mk/zoneminder-not-creating-local-unix-sockets-socket-var-run-zm-zms-581927s-sock-does-not-exist/ https://ris.mk/zoneminder-not-creating-local-unix-sockets-socket-var-run-zm-zms-581927s-sock-does-not-exist/] | |||
[https://forums.zoneminder.com/viewtopic.php?t=26099 https://forums.zoneminder.com/viewtopic.php?t=26099] | |||
[https://github.com/ZoneMinder/zoneminder/blob/master/misc/apache.conf.in https://github.com/ZoneMinder/zoneminder/blob/master/misc/apache.conf.in] | |||
== Android App == | == Android App == | ||
Zeile 114: | Zeile 248: | ||
[https://zoneminder.com/ https://zoneminder.com/] | [https://zoneminder.com/ https://zoneminder.com/] | ||
[https://github.com/ZoneMinder/zoneminder https://github.com/ZoneMinder/zoneminder] | |||
[https://forums.zoneminder.com/ https://forums.zoneminder.com/] | |||
[https://zoneminder.readthedocs.io/en/stable/index.html https://zoneminder.readthedocs.io/en/stable/index.html] | |||
[https://wiki.zoneminder.com/Hardware_Compatibility_List https://wiki.zoneminder.com/Hardware_Compatibility_List] | [https://wiki.zoneminder.com/Hardware_Compatibility_List https://wiki.zoneminder.com/Hardware_Compatibility_List] | ||
Zeile 120: | Zeile 260: | ||
Zurück zu [[ | Zurück zu [[Zoneminder (unterschiedliche Versionen)|Zoneminder]] |
Aktuelle Version vom 23. Juli 2023, 15:15 Uhr
Noch in Bearbeitung
Voraussetzungen
LAMP-Server (Installation PHP ist unter Apache HTTP beschrieben):
Installation
Repository
PPA-Repository hinzufügen und aktualisieren:
sudo add-apt-repository ppa:iconnor/zoneminder sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
MySQL
Den symbolischen Link my.cnf
löschen und durch die Beispiel-Konfigurationsdatei ersetzen:
sudo rm /etc/mysql/my.cnf sudo cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
Danach diese Datei editieren
sudo vi /etc/mysql/my.cnf
und im Abschnitt [mysqld]
folgende Zeile hinzufügen:
sql_mode = NO_ENGINE_SUBSTITUTION
Danach MySQL-Server neu starten:
sudo systemctl restart mysql
ZoneMinder - Teil 1
ZoneMinder installieren:
sudo apt-get install zoneminder
Danach die SQL-Patches einfügen:
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@'localhost' identified by 'zmpass';"
Berechtigungen anpassen:
sudo chmod 740 /etc/zm/zm.conf sudo chown root:www-data /etc/zm/zm.conf sudo chown -R www-data:www-data /usr/share/zoneminder/
Den Benutzer www-data
zur Gruppe video
hinzufügen:
sudo adduser www-data video
cambozola
cd /usr/src && sudo wget http://www.andywilcock.com/code/cambozola/cambozola-latest.tar.gz sudo tar -xzvf cambozola-latest.tar.gz sudo cp cambozola-0.936/dist/cambozola.jar /usr/share/zoneminder sudo chmod 775 /usr/share/zoneminder/cambozola.jar
Apache - Teil 1
Folgende Module aktivieren:
sudo a2enconf zoneminder sudo a2enmod cgi sudo a2enmod rewrite
ZoneMinder - Teil 2
sudo systemctl enable zoneminder sudo systemctl start zoneminder
PHP
Folgende Datei
sudo vi /etc/php/7.0/apache2/php.ini
editieren und Kommentarzeichen entfernen und richtige Zeitzone setzen:
[Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = Europe/Vienna
Apache - Teil 2
Die Datei apache2.conf
sudo vi /etc/apache2/apache2.conf
bearbeiten und AllowOverride
auf All
setzen:
<Directory /usr/share> AllowOverride All Require all granted </Directory> <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Die Apache-Konfigurationen neu laden:
sudo systemctl reload apache2
Danach sollte das Portal bereits verfügbar sein:
http://hostname_or_ip/zm
ZoneMinder
in http://10.0.0.120/zm/index.php?view=options&tab=paths die Variable PATH_ZMS
auf /zm/cgi-bin/nph-zms
ändern.
Links
https://wiki.zoneminder.com/Raspberry_Pi_4_-_Raspbian#Install_and_Configure_Zoneminder
https://wiki.zoneminder.com/Ubuntu_Server_16.04_64-bit_with_Zoneminder_1.30.4_the_easy_way
https://www.piprojects.net/guenstige-videoueberwachung-mit-zoneminder/
Konfiguration
Monitor hinzufügen
Parameter
Ich verwende eine D-Link DCS-7010L, wo die Parameter hier zu finden sind.
(Standard-Zugangsdaten für das Webinterface der DCS-7010L sind:
Nutzername: admin
Passwort: <leer>
Source Type: Remote Remote Protocol: RTSP Remote Method: RTP/Unicast Remote Host Port: 554 Remote Host Name: <IP Address of Camera> (RTSP authentication didn't work with this method) Remote Host Path: /live1.sdp
Source Type: Remote Remote Protocol: Ffmpeg Remote Host Path: rtsp://<IP Address of Camera>:554/live1.sdp Remote Host Path: rtsp://user:pass@<IP Address of Camera>:554/live1.sdp (when RTSP authentication is enabled)
Source Type: Remote Remote Protocol: HTTP Remote Host Port: 80 Remote Host Name: user:pass@<IP Address of Camera> Remote Host Path: /video1.mjpg
Im Webinterface der DCS-7010L unter SETUP->AUDIO UND VIDEO->BENUTZERPROFIL 1
den Modus auf MPEG4
ändern.
Links
http://zoneminder.readthedocs.io/en/latest/userguide/gettingstarted.html
[ https://wiki.zoneminder.com/D-Link#DCS-7010L https://wiki.zoneminder.com/D-Link#DCS-7010L]
Probleme
2018-02-07 00:24:54.577297 web_js 1972 ERR getStreamCmdResponse stream error: Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors() ?view=watch 2018-02-07 00:24:54.447549 web_php 1972 ERR Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. /usr/share/zoneminder/www/includes/functions.php 2033 2018-02-07 00:24:53.574445 zma_m2 2105 INF Wohnung: 24000 - Analysing at 20.00 fps zm_monitor.cpp 1296 2018-02-07 00:24:46.061088 zmc_m2 2095 INF Wohnung: 30000 - Capturing at 25.00 fps zm_monitor.cpp 3125 2018-02-07 00:24:42.444576 web_js 1506 ERR getStreamCmdResponse stream error: Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors() ?view=watch 2018-02-07 00:24:42.299644 web_php 1506 ERR Socket /var/run/zm/zms-624021s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. /usr/share/zoneminder/www/includes/functions.php
Links
Noch nicht getestet
https://forums.zoneminder.com/viewtopic.php?t=26099
https://github.com/ZoneMinder/zoneminder/blob/master/misc/apache.conf.in
Android App
Links
https://play.google.com/store/apps/details?id=com.pliablepixels.zmninja_pro&hl=en
Links
https://github.com/ZoneMinder/zoneminder
https://forums.zoneminder.com/
https://zoneminder.readthedocs.io/en/stable/index.html
https://wiki.zoneminder.com/Hardware_Compatibility_List
https://piprojects.net/guenstige-videoueberwachung-mit-zoneminder/
Zurück zu Zoneminder