Guys,
I am a bsd/unix noob and setting this up was a nightmare. I haven't got my cameras connected yet so I don't even know if this is fully working, but at least I got the zoneminder console working.
The problem, as mentioned earlier, is that this guide is not up-to-date for version 9.3 of freenas.
There are several packages required that aren't installed by default.
First off, I don't use the ports, I used pkgng and installed all packages using "pkg install <pkgname>" command. It actually makes things easier, though again, certain additional packages are required.
I couldn't even start apache b/c it was missing dependencies. So after I install all of standard packages in the guide, I ran
That seemed to update all of the dependencies needed to start my apache server.
THEN, I had a problem importing the zm_create.sql file. It was located in /usr/local/share/doc/zoneminder/zm_create.sql.
I was getting errors related to the sql syntax. Didn't write them down, but I edited the file and kept trying to fix them but I'm not skilled enough to solve all the errors that kept popping up.
Out of frustration, I went online and searched for an alternative zm_create.sql. I found one, but got different errors. The errors with that file were easier to solve, and I FINALLY got it to load.
I attached the file, just c/p it into a .sql file and place in your zm jail.
So that was all enough to actually see the zoneminder console from the <jailip>/zoneminder address. But zoneminder wasn't started :(
Tried to start zoneminder from inside the jail and got missing pkg errors.
Here are additional packages I needed in addition to what is shown in the guide:
Code:
p5-DBI
p5-DBD-mysql
p5-libwww
Lastly, I got a really annoying error trying to start zoneminder service, with an error stating column 'Pid' in 'Logs' is out of range. Googled it and found a russian site with a solution
http://www.tune-it.ru/en/web/pakhom/home/-/blogs/zoneminder-out-of-range-value-for-column-pid-;jsessionid=e2ffb9dbaa97940d4b583d6f194f?p_p_auth=sPZs0zGG&_33_redirect=http://www.tune-it.ru/en/web/pakhom/home;jsessionid=e2ffb9dbaa97940d4b583d6f194f?p_p_auth=sPZs0zGG&p_p_id=33&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1
I translated that from russian to english. Looks like Pid is declared as a "smallint" with a very small range. Need to redefine it as an "int".
Steps:
show columns table in Logs
Code:
SHOW COLUMNS FROM Logs;
Pid is set to "smallint"
Change it to "int"
Code:
ALTER TABLE Logs MODIFY Pid int;
Now it has much larger range of (-2147483648 to 2147483647)
After all of that, I FINALLY got the zm console to show "running". PHEW. If I run into further issues, I will post them here. If someone wants something more detailed, I made a wiki to keep track of what I did to get this working, I can post it here (when you are a newb like me, I can't do this kind of stuff w/o keeping track of what I am doing, step-by-step).