just for reference to get api working on pi 4 with buster
nano /usr/share/zoneminder/www/api/app/Config/database.php.default
edit lines from 65
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'login' => your zmuser,
'password' => your db password,
'database' => your zmdb,
'ssl_ca' =>
'ssl_key' =>
'ssl_cert' =>
'prefix' => '',
'encoding' => 'utf8',
);
then save as /usr/share/zoneminder/www/api/app/Config/database.php
nano /etc/apache2/conf-enabled/zoneminder.conf
Replace contents with
# 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>
<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>
save
service apache2 restart
systemctl restart zoneminder
and it should work
P.S. my setup atm is a pi 400 with a old 500gb (5400rpm) 2.5 hdd connected with ugreen usb3 2 sata
https://www.amazon.com.au/gp/product/B0 ... UTF8&psc=1
I run 5 cameras set to modetect and tuned to eliminate trees moving etc and set to remove files more then 7 days old it works great
to make the hdd work (and to ditch sdcard simply install buster on the sd edit the cmdline.txt to be console=serial0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
and use belancher to clone the sd card to hdd then simply plug hdd into pi (dont put the sdcard in ) and boot make sure to change login from pi -raspberry and enable ssh and expand the rootfs to use the whole drive and set locals with raspi-config