Debian 13 Trixie with Zoneminder 1.36.35 or Zoneminder 1.37.x

From ZoneMinder Wiki
Revision as of 10:27, 16 August 2025 by Bbunge (talk | contribs)
Jump to navigationJump to search

Notice: These procedure are for a new install of Zoneminder 1.36.35 on Debian 13 Trixie.

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 root. 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.

Note: This is an install procedure for new installations! Upgraders are encouraged to search the Zoneminder Forum for upgrade information!

To begin, install Debian 13 Trixie along with Apache2, PHP and Mariadb (recommended). A quick way to do this is:

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

Install Zoneminder

sudo apt install zoneminder

Create Zoneminder database in Mariadb (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

sudo chmod 740 /etc/zm/zm.conf

sudo chown root:www-data /etc/zm/zm.conf

Create a new user if you plan to use local (USB or capture card) cameras.

sudo adduser www-data video

Enable and start Zoneminder

sudo systemctl enable zoneminder.service
sudo systemctl start zoneminder 

Enable Apache Modules

sudo a2enconf zoneminder
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod expires

Restart Apache

sudo service apache2 reload

Remember to set your timezone in Zoneminder - Options