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.
In Bookwork sudo is installed but you will have to add the user to the sudoers file. Become root with
sudo su
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:
sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql lsb-release gnupg2
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
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)
a dduser www-data video
Start Zoneminder
systemctl start zoneminder.service
Enable Zoneminder configuration in Apache.
a2enconf zoneminder a2enmod rewrite a2enmod headers a2enmod expires service apache2 reload
Install complete. Open Zoneminder/Options and set the timezone