ZoneMinder

ZoneMinder is a system to provide monitoring, logging and a browser based interface to security cameras. As of this writing, there is no ebuild (there used to be one). It can support multiple V4L and network connected devices with a clear uncluttered interface in any browser.

Build LibAV (with network support)
Add network use flag to build file /etc/portage/package.use ... media-video/libav network Then compile libav with network support

MySQL

 * Create a database


 * Import the database schema and base data, the .sql script is created by the configure phase above, so make sure you do that first.


 * Create a MySQL user for ZM to use. If you change the user and/or password from the defaults here, then make sure you set those in the source configure phase.

Dependencies
This is the Perl module checking from configure. You'll have to add any missing ones yourself. checking for perl... perl checking for perl version greater than or equal to 5.6.0... ok checking for perl module Sys::Syslog... ok checking for perl module DBI... ok checking for perl module DBD::mysql... ok checking for perl module Getopt::Long... ok checking for perl module Time::HiRes... ok checking for perl module Date::Manip... ok checking for perl module LWP::UserAgent... ok checking for perl module ExtUtils::MakeMaker... ok checking for perl module Module::Load... ok checking for perl module Device::SerialPort... ok checking for perl module Net::FTP... ok checking for perl module Net::SFTP::Foreign... no configure: WARNING: Net::SFTP::Foreign is required for automatic event uploading using sftp checking for perl module Expect... ok checking for perl module Archive::Tar... ok checking for perl module Archive::Zip... ok checking for perl module Net::SMTP... ok checking for perl module MIME::Lite... ok checking for perl module MIME::Entity... ok checking for perl module X10::ActiveHome... no configure: WARNING: X10::ActiveHome is required for X.10 support

Apache
PHP Parse error: syntax error, unexpected $end in /var/www/localhost/htdocs/zm/includes/functions.php on line 2437
 * Enable PHP short tags if you get the following errors in Apache's error log and in the browser output


 * Set date.timezone in if the output is full of timezone errors to e.g. "Europe\London"

Selinux
If you are using selinux you must create a policy. Hopefully later when the ebuild comes back this will be done automatically.

Make local_zoneminder.te module local_zoneminder 1.0;

require { type httpd_t; type initrc_var_run_t; type initrc_t; type v4l_device_t; type file_t; class unix_stream_socket { read connectto }; class file { read lock }; class shm { unix_read unix_write associate read write getattr }; class chr_file getattr; }

allow httpd_t initrc_t:unix_stream_socket connectto; allow httpd_t initrc_t:shm { unix_read unix_write associate read write getattr }; allow httpd_t initrc_var_run_t:file { read lock }; allow httpd_t v4l_device_t:chr_file getattr; Now it's time to build the modules.
 * 1) ============= httpd_t ==============

Other
Shared memory: sysctl kernel.shmmax=536870912