ZoneMinder

ZoneMinder Capture, analyse, record and monitor any cameras attached to your system.

Dependencies

 * Apache 2: www-servers/apache
 * MySQL: dev-db/mariadb
 * PHP: dev-lang/php

USE flags
Enable the following USE flags for and :

Emerge
Install ZoneMinder:

Apache

 * Select correct version of PHP:


 * Edit to reflect the following:


 * Edit and add   to APACHE2_OPTS :


 * Remove Apache startup warning :

MySQL

 * Create ZoneMinder's database,, as a regular user:


 * Import the database schema and base data, the 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.

ZoneMinder

 * Edit and add the above MySQL database username and password:

Options -> Paths -> PATH_ZMS = /zm/cgi-bin/zms
 * By default installs as a virtual host under  - this requires PATH_ZMS to be updated in the webui:

OpenRC
Add Apache to the default runlevel and start:

Add PHP to the default runlevel and start:

Add MySQL to the default runlevel and start:

Add ZoneMinder to the default runlevel and start:

systemd
Start the Apache server:

Add Apache to startup:

Start the PHP server:

Add PHP to startup:

Start the MySQL server:

Add MySQL to startup:

Start the ZoneMinder server:

Add ZoneMinder to startup:

SELinux
When using SELinux, first create a SELinux policy for the application:

Now build the modules:

Other
Shared memory: