zoneminder/distros/ubuntu2004
Isaac Connor 134d80a91d Replace Requires with BindsTo and add comment explaining how to override 2022-01-12 11:32:08 -05:00
..
conf/apache2 Remove apache2.2 auth lines 2021-02-17 12:40:14 -05:00
examples Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
patches Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
source remove mootools from debian packaging 2021-01-18 07:59:54 -06:00
NEWS Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
README.Debian Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
TODO Fix filename 2021-02-17 12:40:41 -05:00
changelog Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
clean Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
compat drop back to compat 12 for buster 2021-02-17 14:13:42 -05:00
control Add libgsoap to dependencies 2022-01-08 12:37:05 -05:00
copyright Build: Remove in-tree version of CheckPrototypeDefinition 2021-06-01 08:41:44 +02:00
gbp.conf Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
libzoneminder-perl.install Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
rules Add option ZM_NO_PCRE to disable testing for libpcre3. debian wants to remove it so this allows us to test building without it. Remove libpcre3 from depends and set ZM_NO_PCRE=ON in debian build config 2021-11-24 12:44:07 -05:00
zoneminder-doc.doc-base Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder-doc.install Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder-doc.links Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.apache2 Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.bug-presubj Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.dirs Include new fonts dir in install 2020-12-03 13:30:51 -05:00
zoneminder.docs Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.examples Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.init put back sysV init script for beowulf/wsl 2020-09-23 11:30:40 -04:00
zoneminder.install Add icons to installed files 2021-02-17 11:56:43 -05:00
zoneminder.links Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.lintian-overrides Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.logrotate Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.maintscript Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.manpages Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.postinst Handle auth to mysql problems more gracefully 2021-10-28 12:46:42 -04:00
zoneminder.postrm Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.preinst Add new cleaned up rules for focal and buster 2020-04-23 15:02:22 -04:00
zoneminder.service Replace Requires with BindsTo and add comment explaining how to override 2022-01-12 11:32:08 -05:00
zoneminder.tmpfile Add an age component of 7d to /var/tmp/zm so that exports and other files go away 2021-06-15 10:44:02 -04:00

README.Debian

Zoneminder for Debian
---------------------

Initializing database
---------------------

    pv /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf
OR
    cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf

    echo 'grant lock tables,alter,create,index,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";'\
    | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql

Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf"
accordingly.

The following command can help to ensure that zoneminder can read its
configuration file:

    chgrp -c www-data /etc/zm/zm.conf


Upgrading database
------------------

The database is updated automatically on installation. You should not need to take this step.

Assuming that database is on "localhost" then the following command can be
used to upgrade "zm" database:

    zmupdate.pl

Additional permissions may be required to perform upgrade:

    echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";'\
    | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql

The following command prints the current version of zoneminder database:

    echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' \
    | sudo mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm


Enabling service
----------------

By default Zoneminder service is not automatically started and needs to be
manually enabled once database is configured:

    sudo systemctl enable zoneminder.service


Web server set-up
-----------------

There are few manual steps to get the web interface working:

## Apache2

Apache can be configured as folder "/zm" using sample .conf:

    sudo a2enconf zoneminder

Alternatively Apache web site configuration template can be used to setup
zoneminder as "http://zoneminder":

    sudo cp -v /usr/share/doc/zoneminder/examples/apache.conf /etc/apache2/sites-available/
    sudo a2ensite zoneminder.conf

Common configuration steps for Apache2:

    sudo a2enmod cgi
    sudo service apache2 reload


## nginx / fcgiwrap

Nginx needs "php-fpm" package to support PHP and "fcgiwrap" package
for binary "cgi-bin" applications:

    sudo apt-get install php-fpm fcgiwrap

To enable a URL alias that makes Zoneminder available from

    http://yourserver/zm

the following line is to be added to "server" section of a web site
configuration:

    include /usr/share/doc/zoneminder/examples/nginx.conf;

For "default" web site it would be sufficient to include the above
statement to the file

    /etc/nginx/sites-enabled/default

To avoid problems with feeds from multiple cameras "fcgiwrap" should be
configured to start at least as many processes as there are cameras.
It can be done by adjusting DAEMON_OPTS in "/etc/default/fcgiwrap".
Systemd users may be affected by the following bug:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792705


## Note:

When Zoneminder web site is running it may be necessary to set
Options/Paths/PATH_ZMS to "/zm/cgi-bin/nph-zms" or according to chosen web
site configuration.


Changing the location for images and events
-------------------------------------------

ZoneMinder is now able to be configured to use an alternative location for storing
events and images at compile time. This package makes use of that, so symlinks in
/usr/share/zoneminder/www are no longer necessary.

Access to /dev/video*
---------------------

For cameras which require access to /dev/video*, zoneminder may need the
www-data user added to the video group in order to see those cameras:

  adduser www-data video

Note that all web applications running on the zoneminder server will then have
access to all video devices on the system.

 -- Vagrant Cascadian <vagrant@debian.org>  Sun, 27 Mar 2011 13:06:56 -0700