Debian 12 Bookworm with Zoneminder 1.36.x and 1.37.x
Debian 12 Bookworm is being released with Zoneminder 1.36.33 and as usual for Debian the zm database needs to be created manually.
This is an initial version and I can get Zoneminder to install and load but can't get a camera to stream. Be patient as we work on this....
In Bookworm sudo is installedwith the desktop version but you will have to install sudo with the server version andadd the user to the sudoers file. Become root with
su
Install sudo
apt install sudo
Then add the user
/sbin/adduser username sudo
I recommend rebooting at this point
Become root
sudo su
Install Apache2, PHP and your favorite database (Mariadb recommended). A quick way to install LAMP is:
apt install apache2 mariadb-server php libapache2-mod-php php-mysql
Secure MySQL or Mariadb, create root password et. al.
mysql_secure_installation
Install Zoneminder
apt install zoneminder
Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
mysqladmin -uroot -p reload
Set permissions of /etc/zm/zm.conf to root:www-data 740
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
chown -R www-data:www-data /usr/share/zoneminder/
chown -R www-data:www-data /var/cache/zoneminder/
Enable Zoneminder service to start at boot
systemctl enable zoneminder.service
Add www-data to the sudo group (to enable use of local video devices)
adduser www-data video
Start Zoneminder
systemctl start zoneminder.service
Enable Zoneminder configuration in Apache.
a2enconf zoneminder a2enmod cgi a2enmod rewrite a2enmod headers a2enmod expires service apache2 reload
Install complete. Open Zoneminder/Options and set the timezone