Difference between revisions of "Debian 11 Bullseye with Zoneminder 1.36.x"

From ZoneMinder Wiki
Jump to navigationJump to search
(Update after ensuring the presence of bullseye packages of 1.36.11. Improved process that doesn't involve wget and gdebi. Remove mysql optimisations that are not actually relevant. They should go in a new document as they are not debian specific.)
Line 1: Line 1:
Updated 11AUG21 for Debian 11
Updated 11AUG21 for Debian 11


Debian 11 Bullseye is being released with Zoneminder 1.34.23 and as usual for Debian the zm database needs to be created manually. This is not user friendly so I have created this install to use the Zoneminder-Buster packages from the zmrepo. Yes this works as I have installed this on my production server!
Debian 11 Bullseye is being released with Zoneminder 1.34.23 and as usual for Debian the zm database needs to be created manually. This is not user friendly and 1.34 is considered old and unsupported.  So we will be using the packages provided by the ZoneMinder development team hosted at zmrepo.zoneminder.com.  
 
'''Upgrade'''The original instructions were for Zoneminder 1.36.5. To upgrade to the current release do steps 2 and 4 below. Should I not update this instruction just use the released version numbers for the install and doc packages.


Note: The following is for amd64 version of Bullseye. If there are packages in the zmrepo for other Buster architectures this should work by substituting the install packages for your architecture.  
Note: The following is for amd64 version of Bullseye. If there are packages in the zmrepo for other Buster architectures this should work by substituting the install packages for your architecture.  


Debian, unlike Ubuntu, does not install sudo with the initial setup. While you can log in as root, a user with sudo authority is recommended.  
Debian, unlike Ubuntu, does not install sudo with the initial setup. While you can log in as root, a user with sudo authority is recommended.  
Line 22: Line 19:
  sudo timedatectl set-timezone America/New_York
  sudo timedatectl set-timezone America/New_York
Of course use your timezone in place of America/New_York.
Of course use your timezone in place of America/New_York.
Mariadb additional settings
The default values for the database are adequate for initial setup. However, I recommend you make these changes before installing Zoneminder:
Edit the Mariadb config file:
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add the following in the [mysql] area:
innodb_file_per_table = ON
innodb_buffer_pool_ size = 256M
innodb_log_file_size - 32M
CTRL+o then [Enter] to save
CTRL+x to exit
Reatart Mariadb:
sudo service mysql restart
I recommend you install mysqltuner and run it from time to time and adjust the database settings as the number of saved events grows.


1. Install Debian 11 (Bullseye), desktop or server version, along with Apache2, PHP and your favorite database (Mariadb recommended). A quick way to install LAMP this is:
1. Install Debian 11 (Bullseye), desktop or server version, along with Apache2, PHP and your favorite database (Mariadb recommended). A quick way to install LAMP this is:
Line 45: Line 24:
  sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql
  sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql


2. Download zoneminder-doc_1.36.5-buster_all.deb and zoneminder_1.36.5-buster_amd64.deb (Yes, these are the files for Buster but read on)
2. deb https://zmrepo.zoneminder.com/debian/master "`lsb_release  -c -s`"/" >> /etc/apt/sources.list.d/zoneminder.list
 
wget https://zmrepo.zoneminder.com/debian/release-1.36/buster/zoneminder-doc_1.36.7-buster_all.deb
 
wget https://zmrepo.zoneminder.com/debian/release-1.36/buster/zoneminder_1.36.7-buster_amd64.deb
 
3. Then secure Mariadb:
 
sudo mysql_secure_installation
 
4. Install Gdebi:
 
sudo apt install gdebi


5. Install Zoneminder:
3. wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | sudo apt-key add -


sudo gdebi zoneminder_1.36.5-buster_amd64.deb zoneminder-doc_1.36.y_all.deb
4. sudo apt-get update && sudo apt install zoneminder=1.36.11


6. Additional steps:
6. Additional steps:
Line 68: Line 35:
  sudo systemctl start zoneminder
  sudo systemctl start zoneminder
  sudo a2enconf zoneminder
  sudo a2enconf zoneminder
  sudo a2enmod rewrite
  sudo a2enmod rewrite headers expires
  sudo service apache2 reload
  sudo service apache2 reload


9. Open Zoneminder http://(IP-Address)/zm and remember to change the Timezone in Options-Timezone
9. Open Zoneminder http://(IP-Address)/zm and remember to change the Timezone in Options-Timezone

Revision as of 19:14, 7 December 2021

Updated 11AUG21 for Debian 11

Debian 11 Bullseye is being released with Zoneminder 1.34.23 and as usual for Debian the zm database needs to be created manually. This is not user friendly and 1.34 is considered old and unsupported. So we will be using the packages provided by the ZoneMinder development team hosted at zmrepo.zoneminder.com.

Note: The following is for amd64 version of Bullseye. If there are packages in the zmrepo for other Buster architectures this should work by substituting the install packages for your architecture.

Debian, unlike Ubuntu, does not install sudo with the initial setup. While you can log in as root, a user with sudo authority is recommended.

To enable sudo: In a terminal,become root with su. Enter your root password. Install sudo with:

apt install sudo

Add the user account to the group sudo with:

/sbin/adduser username sudo 

where username is your user account. Exit root then log out and then log in with the same user.

Timezone: it is recommended you set your specific timesone with:

sudo timedatectl set-timezone America/New_York

Of course use your timezone in place of America/New_York.

1. Install Debian 11 (Bullseye), desktop or server version, along with Apache2, PHP and your favorite database (Mariadb recommended). A quick way to install LAMP this is:

sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql

2. deb https://zmrepo.zoneminder.com/debian/master "`lsb_release -c -s`"/" >> /etc/apt/sources.list.d/zoneminder.list

3. wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | sudo apt-key add -

4. sudo apt-get update && sudo apt install zoneminder=1.36.11

6. Additional steps:

sudo systemctl enable zoneminder.service
sudo systemctl start zoneminder
sudo a2enconf zoneminder
sudo a2enmod rewrite headers expires
sudo service apache2 reload

9. Open Zoneminder http://(IP-Address)/zm and remember to change the Timezone in Options-Timezone