HOWTO: Installing ZoneMinder in a FreeNAS 11 Jail

fontes31

Explorer
Joined
Apr 6, 2012
Messages
96
I got this error on service apache24 restart:

Starting apache24.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,458
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1.
That's a warning, not an error--it isn't a problem.
 

fontes31

Explorer
Joined
Apr 6, 2012
Messages
96
ok, so i did this -
root@zoneminder1:/ # service zoneminder status
running

I think all is ok, but i cannot get zm. I opened on browser - jail's ip/zm, but nothing
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
I got this error on service apache24 restart:

Starting apache24.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

That error means it does not know its reachable IP and will only be reachable on 127.0... from within your jail, not your lan.

edit /usr/local/etc/apache24/httpd.conf

Find server name and change it to your ip.
Restart everything.
Run sockstat -4 and zoneminder should be running on your lan ip or * ip (any) but NOT 127.0.0.1
 

fontes31

Explorer
Joined
Apr 6, 2012
Messages
96
i restarted everything runed sockstat -4:
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
mysql mysqld 42166 13 tcp46 *:3306 *:*
root syslogd 41996 7 udp4 *:514 *:*

and entered the jail ip (192.168.1.2) on httpd.conf file

tried to run http://192.168.1.2/zm on browser but not connected
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
start zoneminder first, service zoneminder start
From your output its not running.
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Its not a networking problem then, nothing is running on port 80 from your output :/

USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
mysql mysqld 42166 13 tcp46 *:3306 *:*
root syslogd 41996 7 udp4 *:514 *:*

I see mysql and syslog ? But no apache or zm process
 

fontes31

Explorer
Joined
Apr 6, 2012
Messages
96
Do you know where is the problem? I followed the tutorial and all was ok.
I added on /usr/local/etc/apache24/httpd.conf my jail ip, like this
192.168.1.2
Should i have to add :80? or the freenas ip?
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Yes you should add the :80. The file should look like this
Code:
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 192.168.1.4:80
#
#
 

fontes31

Explorer
Joined
Apr 6, 2012
Messages
96
Yes you should add the :80. The file should look like this
Code:
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 192.168.1.4:80
#
#
not working, same problem
 

fontes31

Explorer
Joined
Apr 6, 2012
Messages
96
I have this:
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
www httpd 15373 3 tcp4 192.168.1.2:80 *:*
www httpd 15372 3 tcp4 192.168.1.2:80 *:*
www httpd 15371 3 tcp4 192.168.1.2:80 *:*
www httpd 15370 3 tcp4 192.168.1.2:80 *:*
www httpd 15368 3 tcp4 192.168.1.2:80 *:*
root httpd 15364 3 tcp4 192.168.1.2:80 *:*
mysql mysqld 15291 13 tcp46 *:3306 *:*
root syslogd 15097 7 udp4 *:514 *:*

on httpd.conf i have this:

Listen 192.168.1.2:80
ServerName 192.168.1.2:80
 

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
Hi All, anyone knows how to set the permissions for a separate dataset outside the jail storage pool to save the events and images from ZM?
I have installed ZM on my FreeNAS 11.2 Release inside the new iocage system. My jails are installed in a different SSD and I put a separate HDD to save all the data from ZM. after setting up the mountpponts I am getting permission denied error, any idea?

1544881413250.png

1544881394200.png
 

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
I figured it out, I set the user and group owner to www, and all is working fine.
 

joster

Cadet
Joined
Dec 31, 2018
Messages
6
Can not initialse the ZM-database. After running the following line:
mysql -uroot -p < /usr/local/share/zoneminder/db/zm_create.sql
I'm asked for a password. The only password I know is the root password for FreeNas but that does not work. Access is denied (se below).

Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Any suggestions what to do?

/Johan
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,458
That mysql command should really be changed to remove the -p flag, as you haven't set a password yet. Try it that way.
 

joster

Cadet
Joined
Dec 31, 2018
Messages
6
Installed everything according to the guide without any errors but I can only see a blank page page in my browser. Any suggestions what might be wrong?
Zonminder service is running.

I'm a new to FreeBSD/Linux/FreeNAS so this is a bit complicated for me.... :-/

/Johan
 

kmb5405

Cadet
Joined
Jan 13, 2019
Messages
6
I've gone through the guide and made corrections to the process as needed from the posts here. I get all the way to the end of the guide without any issues, including all of the tests "it works!" and info.php test.. etc. Everything looks good, verified apache24, mysql-server, and zoneminder services are all running without error (service X status).

When I navigate to the jail IP (http://192.168.1.xxx) I get http error 500 and if i Add "/zm" I get 404 not found. Any help is greatly appreciated.
 

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
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.
 
Last edited:

kmb5405

Cadet
Joined
Jan 13, 2019
Messages
6
I'm not going to switch to 11.2 just yet, still not comfortable with it on my test bench.
 
Top