Debian 12 Bookworm with Zoneminder 1.36.33

From ZoneMinder Wiki
Revision as of 13:15, 6 June 2023 by Bbunge (talk | contribs)
Jump to navigationJump to search

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. I am able to get a cam to stream and capture. Please report issues on the Zoneminder Forum (https://forums.zoneminder.com/viewforum.php?f=43)

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