It looks like your script ran this time but I am not sure why you are getting those
command not found
errors.
If you want, you can try the following to rebuild a jail from scratch just to test it out.
1. Log into the shell of freenas.
2. Create a
pkgs.json
file (I used vi for this but you can use a different editor)
3. Copy the following to it & save it.
Code:
{
"pkgs": [
"mysql57-server",
"mysql57-client",
"fcgiwrap",
"nginx",
"zoneminder",
"git"
]
}
4. Run the following commands.
Note: I named my jail
zoneminder-jail but you can change to to something else. Just make sure they are all the same below & the jail name you pick is not used yet.
Code:
iocage fetch -r 11.3-RELEASE
iocage create -r 11.3-RELEASE -p ./pkgs.json -n zoneminder-jail dhcp=on boot=on
iocage exec zoneminder-jail git clone https://github.com/freenas/iocage-plugin-zoneminder.git
iocage exec zoneminder-jail cp -R iocage-plugin-zoneminder/overlay/ /
iocage exec zoneminder-jail iocage-plugin-zoneminder/post_install.sh
After the last line, I got the following output;
Code:
nginx_enable: -> YES
mysql_enable: -> YES
fcgiwrap_enable: -> YES
fcgiwrap_user: -> www
fcgiwrap_socket_owner: -> www
fcgiwrap_flags: -> -c 4
php_fpm_enable: -> YES
zoneminder_enable: -> YES
Performing sanity check on nginx configuration:
Starting nginx.
Performing sanity check on php-fpm configuration:
Starting php_fpm.
Starting fcgiwrap.
Starting mysql.
Database User: dbadmin
Database Password: [randomly generated password]
SQL Temp Password: [randomly generated password]
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
Stopping mysql.
Waiting for PIDS: 64245.
Starting mysql.
Stopping fcgiwrap.
Waiting for PIDS: 52334.
Starting fcgiwrap.
Performing sanity check on php-fpm configuration:
Stopping php_fpm.
Waiting for PIDS: 52249.
Performing sanity check on php-fpm configuration:
Starting php_fpm.
Performing sanity check on nginx configuration:
Stopping nginx.
Waiting for PIDS: 52179.
Performing sanity check on nginx configuration:
Starting nginx.
The
Database User, and Database Password are stored in ~/
folder as dbuser and dbpassword. These are needed if you ever need to access the MYSQL database for some reason.
This only sets up the jail and gets zoneminder running for testing. Everything will be stored inside the jail and if you ever need to rebuild the jail for some reason, all your video will be lost. I have notes somewhere on how to mount a pool inside a jail for zoneminder but it will take it bit to find them. Hopefully, this will get you up and running for the time being.