Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Discussions related to the 1.36.x series of ZoneMinder
robfish
Posts: 30
Joined: Wed May 16, 2018 11:24 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by robfish »

Too late for me. I am installing ZM on a fresh Bookworm installation.
I'll let you know how I get on
robfish
Posts: 30
Joined: Wed May 16, 2018 11:24 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by robfish »

Well I followed the instructions at
https://wiki.zoneminder.com/Debian_12_B ... er_1.36.33
but when I got to here I stumbled:-

Code: Select all

root@fishminder:/home/robert# systemctl start zoneminder.service
Job for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xeu zoneminder.service" for details.
So I followed the instructions here and all is well again.
https://wiki.zoneminder.com/Debian_11_B ... der_1.36.x

So I will wait until others confirm that the upgrade to Bookworm is safe.
triatk
Posts: 3
Joined: Tue Jun 27, 2023 1:48 am

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by triatk »

The Officiel Guide has a config error in apache
You need to use /var/cache/zoneminder instead of /var/cache/zoneminder/cache

What you should change:
Edit the apache config for zoneminder

Code: Select all

sudo nano /etc/apache2/conf-available/zoneminder.conf
Change the path in red color:
# Order matters. This alias must come first.
Alias /zm/cache "/var/cache/zoneminder"
<Directory "/var/cache/zoneminder">
Save the config file
Restart apache2 service

Code: Select all

sudo service apache2 reload
sudo service apache2 restart
robfish
Posts: 30
Joined: Wed May 16, 2018 11:24 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by robfish »

So do you think I will be safe to upgrade to Bookworm (on this headless server) then make the change/correction to
/etc/apache2/conf-available/zoneminder.conf ?
I think I might try that anyway. It shouldn't take long.
triatk
Posts: 3
Joined: Tue Jun 27, 2023 1:48 am

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by triatk »

robfish wrote: Tue Jun 27, 2023 2:31 am So do you think I will be safe to upgrade to Bookworm (on this headless server) then make the change/correction to
/etc/apache2/conf-available/zoneminder.conf ?
I think I might try that anyway. It shouldn't take long.
That depends on what you want to keep in your old installation, because the default events and images folders are inside the cache folder, so you may need to move them to the new path, otherwise you will lose all your saved events and images.

I'm running zoneminder v1.36.33 under debian 12, it works well.
robfish
Posts: 30
Joined: Wed May 16, 2018 11:24 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by robfish »

I've upgraded and that config file is as you suggested.
The browser page now looks correct but I think I need to alter which php version to use.
Do you know which files I need to do that?
triatk
Posts: 3
Joined: Tue Jun 27, 2023 1:48 am

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by triatk »

robfish wrote: Tue Jun 27, 2023 2:57 am I've upgraded and that config file is as you suggested.
The browser page now looks correct but I think I need to alter which php version to use.
Do you know which files I need to do that?
Just google it
https://tecadmin.net/switch-between-mul ... on-debian/
ubeaut
Posts: 6
Joined: Tue Jun 27, 2023 11:19 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by ubeaut »

This is my first post on this site so bear with me. :D

I followed these instructions:
https://wiki.zoneminder.com/Debian_12_B ... er_1.36.33
I have changed the zoneminder.conf and amended the bits in red in this thread to this:
# Order matters. This alias must come first.
Alias /zm/cache /var/cache/zoneminder
<Directory /var/cache/zoneminder>

I have an issue where the web pages are not being rendered properly. I just see the text part of the displayed output. I have even installed on a fresh install of Debian 12 and same results.
If I revert back the it original zoneminder.conf that comes with the install I do get the web pages displayed correctly but then the API doesn't work.
If I use the modified zoneminder.conf the API works but the webpages don't display correctly.
I cannot get both things to work at once.
Anyone else seeing this behaviour?

Thanks
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by bbunge »

triatk wrote: Tue Jun 27, 2023 2:13 am The Officiel Guide has a config error in apache
You need to use /var/cache/zoneminder instead of /var/cache/zoneminder/cache

What you should change:
Edit the apache config for zoneminder

Code: Select all

sudo nano /etc/apache2/conf-available/zoneminder.conf
Change the path in red color:
# Order matters. This alias must come first.
Alias /zm/cache "/var/cache/zoneminder"
<Directory "/var/cache/zoneminder">
Save the config file
Restart apache2 service

Code: Select all

sudo service apache2 reload
sudo service apache2 restart
Corrected contents of zoneminder.conf in the WIKI: https://wiki.zoneminder.com/Debian_12_B ... er_1.36.33

Seems to have corrected the issue where only Firefox could see the page correctly.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by bbunge »

ubeaut wrote: Tue Jun 27, 2023 11:45 pm This is my first post on this site so bear with me. :D

I followed these instructions:
https://wiki.zoneminder.com/Debian_12_B ... er_1.36.33
I have changed the zoneminder.conf and amended the bits in red in this thread to this:
# Order matters. This alias must come first.
Alias /zm/cache /var/cache/zoneminder
<Directory /var/cache/zoneminder>

I have an issue where the web pages are not being rendered properly. I just see the text part of the displayed output. I have even installed on a fresh install of Debian 12 and same results.
If I revert back the it original zoneminder.conf that comes with the install I do get the web pages displayed correctly but then the API doesn't work.
If I use the modified zoneminder.conf the API works but the webpages don't display correctly.
I cannot get both things to work at once.
Anyone else seeing this behaviour?

Thanks
You did not include the quotes:

Alias "/zm/cache /var/cache/zoneminder"
<Directory "/var/cache/zoneminder">
ubeaut
Posts: 6
Joined: Tue Jun 27, 2023 11:19 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by ubeaut »

Yes quotes are in there I don't know why they stripped out when I pasted.

I have made progress and have both the API and the pages working correctly, although I had them working both before but they may have been cached.
I have rebooted the server and they both are working.

Anyway, what I have done is added these lines:

<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>


# For better visibility, the following directives have been migrated from the
# default .htaccess files included with the CakePHP project.
# Parameters not set here are inherited from the parent directive above.

It is working so far....fingers crossed. I am not a programmer and don't know what those lines mean but it is working for the moment. Time may tell.
robfish
Posts: 30
Joined: Wed May 16, 2018 11:24 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by robfish »

I started again with a fresh Debian 12 and the instructions above (before the edit)
and changed

Code: Select all

Alias /zm/cache /var/cache/zoneminder/cache
<Directory /var/cache/zoneminder/cache>
to

Code: Select all

Alias /zm/cache /var/cache/zoneminder
<Directory /var/cache/zoneminder>
(without the quotation marks) and all is well again.

I think that this advice (in the last post)

Code: Select all

Alias "/zm/cache /var/cache/zoneminder"
<Directory "/var/cache/zoneminder">
Should be

Code: Select all

Alias /zm/cache "/var/cache/zoneminder"
<Directory "/var/cache/zoneminder">
(as in the edited instructions)
ubeaut
Posts: 6
Joined: Tue Jun 27, 2023 11:19 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by ubeaut »

Ok I have done this also with the quotes:
Alias /zm/cache "/var/cache/zoneminder"
<Directory "/var/cache/zoneminder">

And I have removed the other bit I had added:
#<Directory /usr/share/zoneminder/www/api>
# AllowOverride All
#</Directory>

# For better visibility, the following directives have been migrated from the
# default .htaccess files included with the CakePHP project.
# Parameters not set here are inherited from the parent directive above.

And now it appears to be working for both web page displaying correctly and the API works.
WooHooo :D Hapy days again.

This is the zoneminder.conf I have at the moment. Hopefully it will work continuously now.

# Remember to enable cgi mod (i.e. "a2enmod cgi").
ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>

# Order matters. This alias must come first.
Alias /zm/cache "/var/cache/zoneminder"
<Directory "/var/cache/zoneminder">
Options -Indexes +FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
</Directory>

Alias /zm "/usr/share/zoneminder/www"
<Directory /usr/share/zoneminder/www>
Options -Indexes +FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>

# For better visibility, the following directives have been migrated from the
# default .htaccess files included with the CakePHP project.
# Parameters not set here are inherited from the parent directive above.
<Directory "/usr/share/zoneminder/www/api">
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
RewriteBase /zm/api
</Directory>

<Directory "/usr/share/zoneminder/www/api/app">
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
RewriteBase /zm/api
</Directory>

<Directory "/usr/share/zoneminder/www/api/app/webroot">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteBase /zm/api
</Directory>
robfish
Posts: 30
Joined: Wed May 16, 2018 11:24 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by robfish »

Thanks for all of the help/advice I have received in this thread.
ubeaut
Posts: 6
Joined: Tue Jun 27, 2023 11:19 pm

Re: Debian 12 "Bookworm" with Zoneminder 1.36.33 Install Procedure

Post by ubeaut »

@Robfish...is yours working now as well?
Post Reply