From 8554ccd64982c8ff6ed101f7bc3182690565588c Mon Sep 17 00:00:00 2001 From: criadoperez Date: Wed, 29 Sep 2021 12:26:15 +0200 Subject: [PATCH 1/4] Added Debian 11 (bullseye) installation --- docs/installationguide/debian.rst | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/docs/installationguide/debian.rst b/docs/installationguide/debian.rst index c6e0cebcf..15cc9660d 100644 --- a/docs/installationguide/debian.rst +++ b/docs/installationguide/debian.rst @@ -3,6 +3,92 @@ Debian .. contents:: +Easy Way: Debian 11 (Bullseye) +------------------------ + +This procedure will guide you through the installation of ZoneMinder on Debian 11 (Bullseye). + +**Step 1:** Setup Sudo (optional but recommended) + +By default Debian does not come with sudo, so you have to install it and configure it manually. +This step is optional but recommended and the following instructions assume that you have setup sudo. +If you prefer to setup ZoneMinder as root, do it at your own risk and adapt the following instructions accordingly. + +:: + + apt install sudo + usermod -a -G sudo + exit + +Now your terminal session is back under your normal user. You can check that +you are now part of the sudo group with the command ``groups``, "sudo" should +appear in the list. If not, run ``newgrp sudo`` and check again with ``groups``. + +**Step 2:** Update system and install zoneminder + +Run the following commands. + +:: + + sudo apt update + sudo apt upgrade + sudo apt install zoneminder + +**Step 3:** Initialize database + +Run the following commands. + +:: + + cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf + echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql + +**Step 4:** Setup permissions for zm.conf + +To make sure zoneminder can read the configuration file, run the following command. + +:: + + sudo chgrp -c www-data /etc/zm/zm.conf + +**Step 5:** Edit Timezone in PHP + +Automated way: +:: + + sudo sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/7.*/apache2/php.ini + +Manual way +:: + + sudo nano /etc/php/7.*/apache2/php.ini + +Search for [Date] (Ctrl + w then type Date and press Enter) and change +date.timezone for your time zone. Don't forget to remove the ; from in front +of date.timezone. + +:: + + [Date] + ; Defines the default timezone used by the date functions + ; http://php.net/date.timezone + date.timezone = America/New_York + +CTRL+o then [Enter] to save + +CTRL+x to exit + +**Step 6:** Reload Apache and start zoneminder + +Run the following commands. + +:: + + sudo systemctl reload apache2 + sudo systectl start zoneminder + +Congratulations! You should now be able to access zoneminder at ``http://yourhostname/zm`` + Easy Way: Debian Buster ------------------------ From 9f683c0c91f7c5f37d10f1bf502d499016a7bb84 Mon Sep 17 00:00:00 2001 From: criadoperez Date: Wed, 29 Sep 2021 14:14:25 +0200 Subject: [PATCH 2/4] Removed default-file parameter that is deprecated --- docs/installationguide/debian.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installationguide/debian.rst b/docs/installationguide/debian.rst index 15cc9660d..50173928f 100644 --- a/docs/installationguide/debian.rst +++ b/docs/installationguide/debian.rst @@ -40,8 +40,8 @@ Run the following commands. :: - cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf - echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql + cat /usr/share/zoneminder/db/zm_create.sql | sudo mariadb + echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | sudo mariadb **Step 4:** Setup permissions for zm.conf From e462c231151ecb6044d747e3a1ad29ef948af3dd Mon Sep 17 00:00:00 2001 From: criadoperez Date: Wed, 29 Sep 2021 16:46:04 +0200 Subject: [PATCH 3/4] updated dlandon repository name --- docs/installationguide/easydocker.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installationguide/easydocker.rst b/docs/installationguide/easydocker.rst index 899ce0e5d..a7d37a9e5 100644 --- a/docs/installationguide/easydocker.rst +++ b/docs/installationguide/easydocker.rst @@ -2,7 +2,7 @@ An Easy To Use Docker Image =========================== If you are interested in trying out ZoneMinder quickly, user Dan Landon maintains an easy to use docker image for ZoneMinder. With a few simple configuration changes, it also provides complete Event Notification Server and Machine Learning hook support. Please follow instructions in his repostory. He maintains two repositories: -* If you want to run the latest stable release, please use his `zoneminder repository `__. +* If you want to run the latest stable release, please use his `zoneminder machine learning repository `__. * If you want to run the latest zoneminder master, please use his `zoneminder master repository `__. In both cases, instructions are provided in the repo README files. From 1e71300a3bee9cf8844c4cee6a75f4e0b2d130bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Thu, 30 Sep 2021 01:15:45 +0200 Subject: [PATCH 4/4] added Debian installation instructions --- docs/installationguide/debian.rst | 48 ++----------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/docs/installationguide/debian.rst b/docs/installationguide/debian.rst index 50173928f..f7325fe1f 100644 --- a/docs/installationguide/debian.rst +++ b/docs/installationguide/debian.rst @@ -32,18 +32,12 @@ Run the following commands. sudo apt update sudo apt upgrade + sudo apt install mariadb-server sudo apt install zoneminder -**Step 3:** Initialize database +When mariadb is installed for the first time, it doesn't add a password to the root user. Therefore, for security, it is recommended to run ``mysql secure installation``. -Run the following commands. - -:: - - cat /usr/share/zoneminder/db/zm_create.sql | sudo mariadb - echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | sudo mariadb - -**Step 4:** Setup permissions for zm.conf +**Step 3:** Setup permissions for zm.conf To make sure zoneminder can read the configuration file, run the following command. @@ -51,42 +45,6 @@ To make sure zoneminder can read the configuration file, run the following comma sudo chgrp -c www-data /etc/zm/zm.conf -**Step 5:** Edit Timezone in PHP - -Automated way: -:: - - sudo sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/7.*/apache2/php.ini - -Manual way -:: - - sudo nano /etc/php/7.*/apache2/php.ini - -Search for [Date] (Ctrl + w then type Date and press Enter) and change -date.timezone for your time zone. Don't forget to remove the ; from in front -of date.timezone. - -:: - - [Date] - ; Defines the default timezone used by the date functions - ; http://php.net/date.timezone - date.timezone = America/New_York - -CTRL+o then [Enter] to save - -CTRL+x to exit - -**Step 6:** Reload Apache and start zoneminder - -Run the following commands. - -:: - - sudo systemctl reload apache2 - sudo systectl start zoneminder - Congratulations! You should now be able to access zoneminder at ``http://yourhostname/zm`` Easy Way: Debian Buster