Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

HOWTO: Installing ZoneMinder in a FreeNAS 11 Jail

mvcad

Newbie
Joined
Feb 25, 2018
Messages
76

mvcad

Newbie
Joined
Feb 25, 2018
Messages
76
Joined
Jan 13, 2019
Messages
6
httpd-error.log showing: PHP Fatal error: Uncaught Error: Class 'PDO' not found in /usr/local/www/zoneminder/includes/database.ph$

EDIT: Fixed it by starting over and using mod_php72 and php72-mysqli. All works now!
 
Last edited:

bermau

Newbie
Joined
Jul 4, 2017
Messages
15
So you know, now you can install zoneminder from Freenas GUI under Plugins -> Available Plugins. just need to run the wizard and it will do it all for you. I just did it myself and it worked straight away.
Hi, do you have API working with Zoneminder Freenas Plugin?
I receive cakephp fatal error, navigate to http://myip/zm/api

Cattura.jpg

Any suggestions for me?
 
Joined
Mar 27, 2017
Messages
4
Hi, do you have API working with Zoneminder Freenas Plugin?
I receive cakephp fatal error, navigate to http://myip/zm/api

View attachment 28176

Any suggestions for me?
If you read all errors more closely, you may notice that it is trying to write a log file to /var/log/zm/

Make sure that the folder exists with correct permissions.
 

Clinderw

Newbie
Joined
Aug 11, 2013
Messages
89
The less that's stored inside the jail, the easier it is to rebuild the jail if necessary. If you look at some of the recent how-to documents for iocage jails (e.g., https://forums.freenas.org/index.php?resources/fn11-jailed-unifi-controller-with-lets-encrypt-iocage.81/ or https://forums.freenas.org/index.php?resources/fn11-jailed-crashplan-pro-with-vnc-iocage.79/), they're even putting the config files outside of the jail, so that the only thing stored in the jail itself is the actual software. That means you can destroy the jail and rebuild it with the latest software, even upgrading the underlying OS template, without disturbing your data or configuration.

There's also the fact that some users (like me) put jails on a separate, smaller (sometimes SSD) pool, and wouldn't want the large amount of data taking space on the smaller pool.
How do you change where the config details are saved so I can blow the jail away as often as needed? With all my other jails, I mount a dataset in the jail at '/config' and have it save there. I've tried both of the below two commands (which has worked for other jails/plugins). I also have some that require rc files to do this but don't think zoneminder needs that.

iocage exec zoneminder sysrc zoneminder_conf_dir="/config"
iocage exec zoneminder sysrc zoneminder_data_dir="/config"

Can anyone point me in the right direction - lot of Googling hasn't turned up much yet.

If I'm reading correctly, the changing of the storage is easier because it can be managed within the GUI of zoneminder - any other spots need affected for that?

Chris
 

danb35

FreeNAS Wizard
Joined
Aug 16, 2011
Messages
10,901
How do you change where the config details are saved so I can blow the jail away as often as needed?
I really don't have any idea. If it's supported, there should be a variable in the rc script. Look at /usr/local/etc/rc.d/zoneminder in the jail; the top of that file should document the relevant variables.
 
Joined
Nov 24, 2017
Messages
1
Hi, I finished the guide on 11.1 U6 however I cannot add any cameras (nothing happens when I press add button) and I think my javascript isn't loaded correctly. Any ideas?
i ran into this issue too along with a bunch of others. if you look at the source of the page you will see that the css uri is server.tld/zm/xxx.css

HTTPD.CONF (the first redirect was the cause of most of the issues as the source has some references to full path resources like server.tld/zm/xxxxx, however after going through this tutorial that path dosn't exist, its in the root of the uri)
<VirtualHost *:80>
ServerName whippet.domain.tld
ServerAdmin email@example.com
DocumentRoot "/usr/local/www/zoneminder/"
ScriptAlias /cgi-bin/ /usr/local/www/zoneminder/cgi-bin/
<Directory "/usr/local/www/zoneminder">
Options FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine on
RedirectMatch "^/zm/(.*)" "/$1"
</Directory>
<Directory "/usr/local/www/zoneminder/cgi-bin/">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
#AddHandler test-cgi .cgi .pl .py nph-zms zms
AllowOverride All
Require all granted
</Directory>
<Directory "/usr/local/www/apache24/cgi-bin/">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
<Directory "/usr/local/www/zoneminder/api">
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
RewriteBase /api
</Directory>

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

<Directory "/usr/local/www/zoneminder/api/app/webroot">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteBase /api
</Directory>

LogLevel debug
</VirtualHost>
 
Top