Port details |
- zoneminder Complete security camera solution, fully web based with image analysis
- 1.36.35 multimedia =12 1.36.34Version of this port present on the latest quarterly branch.
- Maintainer: bsd@abinet.ru
- Port Added: 2011-04-29 14:23:21
- Last Update: 2024-10-29 22:26:51
- Commit Hash: bb36fa9
- People watching this port, also watch:: spamassassin, curl, nmap, htop, apache24
- License: GPLv2
- WWW:
- https://www.zoneminder.com/
- Description:
- Zoneminder is an all-in-one GPL'd security and surveillance camera solution.
Fully web-based system for viewing and analyzing security camera feeds.
- ¦ ¦ ¦ ¦
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - There is no configure plist information for this port.
- Dependency lines:
-
- zoneminder${PHP_PKGNAMESUFFIX}>0:multimedia/zoneminder
- To install the port:
- cd /usr/ports/multimedia/zoneminder/ && make install clean
- To add the package, run one of these commands:
- pkg install multimedia/zoneminder
- pkg install zoneminder-php82
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: zoneminder-php82
- Package flavors (<flavor>: <package>)
- php82: zoneminder-php82
- php81: zoneminder-php81
- php83: zoneminder-php83
- php84: zoneminder-php84
- distinfo:
- TIMESTAMP = 1730231836
SHA256 (zoneminder-zoneminder-1.36.35_GH0.tar.gz) = c3636ded4e0e5c5c62535c55153371212a379dbb1aed8c911bd6287721c3d49a
SIZE (zoneminder-zoneminder-1.36.35_GH0.tar.gz) = 11505979
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- p5-DBI>=0 : databases/p5-DBI
- p5-DBD-mysql>=0 : databases/p5-DBD-mysql
- p5-Date-Manip>=0 : devel/p5-Date-Manip
- p5-Test-LWP-UserAgent>=0 : www/p5-Test-LWP-UserAgent
- p5-Sys-Mmap>=0 : devel/p5-Sys-Mmap
- p5-LWP-Protocol-https>=0 : www/p5-LWP-Protocol-https
- p5-Sys-CPU>=0 : devel/p5-Sys-CPU
- p5-Sys-MemInfo>=0 : devel/p5-Sys-MemInfo
- p5-Data-Dump>=0 : devel/p5-Data-Dump
- p5-SOAP-WSDL>=0 : devel/p5-SOAP-WSDL
- p5-Data-UUID>=0 : devel/p5-Data-UUID
- p5-IO-Socket-Multicast>=0 : net/p5-IO-Socket-Multicast
- p5-Number-Bytes-Human>=0 : devel/p5-Number-Bytes-Human
- p5-JSON-MaybeXS>=0 : converters/p5-JSON-MaybeXS
- ffmpeg : multimedia/ffmpeg
- cmake : devel/cmake-core
- gettext-runtime>=0.22_1 : devel/gettext-runtime
- msgfmt : devel/gettext-tools
- perl5>=5.36<5.37 : lang/perl5.36
- Runtime dependencies:
-
- p5-DBI>=0 : databases/p5-DBI
- p5-DBD-mysql>=0 : databases/p5-DBD-mysql
- p5-Date-Manip>=0 : devel/p5-Date-Manip
- p5-Test-LWP-UserAgent>=0 : www/p5-Test-LWP-UserAgent
- p5-Sys-Mmap>=0 : devel/p5-Sys-Mmap
- p5-LWP-Protocol-https>=0 : www/p5-LWP-Protocol-https
- p5-Sys-CPU>=0 : devel/p5-Sys-CPU
- p5-Sys-MemInfo>=0 : devel/p5-Sys-MemInfo
- p5-Data-Dump>=0 : devel/p5-Data-Dump
- p5-SOAP-WSDL>=0 : devel/p5-SOAP-WSDL
- p5-Data-UUID>=0 : devel/p5-Data-UUID
- p5-IO-Socket-Multicast>=0 : net/p5-IO-Socket-Multicast
- p5-Number-Bytes-Human>=0 : devel/p5-Number-Bytes-Human
- p5-JSON-MaybeXS>=0 : converters/p5-JSON-MaybeXS
- ffmpeg : multimedia/ffmpeg
- sudo : security/sudo
- p5-Device-SerialPort>=0 : comms/p5-Device-SerialPort
- p5-Crypt-Eksblowfish>=0 : security/p5-Crypt-Eksblowfish
- p5-Data-Entropy>=0 : security/p5-Data-Entropy
- p5-XML-LibXML>=0 : textproc/p5-XML-LibXML
- zip : archivers/zip
- php.h : lang/php82
- apcu.so : devel/pecl-APCu@php82
- perl5>=5.36<5.37 : lang/perl5.36
- ctype.so : textproc/php82-ctype
- gd.so : graphics/php82-gd
- intl.so : devel/php82-intl
- opcache.so : www/php82-opcache
- pdo_mysql.so : databases/php82-pdo_mysql
- session.so : www/php82-session
- sockets.so : net/php82-sockets
- sysvsem.so : devel/php82-sysvsem
- Library dependencies:
-
- libx264.so : multimedia/libx264
- libmp4v2.so : multimedia/mp4v2
- libgcrypt.so : security/libgcrypt
- libjpeg.so : graphics/jpeg-turbo
- libmysqlclient.so.21 : databases/mysql80-client
- libintl.so : devel/gettext-runtime
- There are no ports dependent upon this port
Configuration Options:
- ===> The following configuration options are available for zoneminder-php82-1.36.35:
NLS=on: Native Language Support
V4L=off: Video 4 Linux support
===> Use 'make config' to modify these settings
- Options name:
- multimedia_zoneminder
- USES:
- cmake:insource,noninja cpe jpeg mysql perl5 php:flavors shebangfix ssl gettext
- pkg-message:
- For install:
- ZoneMinder requires a MySQL (or MySQL forks) database backend and
a http server, capable to execute PHP and CGI scripts.
To simplify things, we assume, that you use MySQL and NGINX on
the same server.
1. Preliminary steps
1.1 Install databases/mysql57-server or newer
You may choose your favourite method - ports or packages here.
ZoneMinder use very simple queries, however it tends to write to
the database quite a lot depending on your capture mode and number
of cameras. So tweak your MySQL instance accordantly
Now, enable and start MySQL
sysrc mysql_server_enable="YES"
service mysql-server start
1.2 Install www/nginx
We provide an example for an HTTP install, however, you should use
HTTPS if you plan to expose your installation to the public. There
are plenty guides how to do it and security/letsencrypt.sh is a
good way to get a valid SSL certificate. Probably, your installation
will be behind reverse proxy, so this example should work for you.
Please, notive the following issues with ZM:
- web interface has several hardcoded /zm in url generation, so it is
mandatory to serve your installtion from /zm subfolder
- if behind reverse proxy, HTTP_X_FORWARDED_PROTO must be supplied or link
generation will use http://
Your server block should include the following:
server {
listen 80;
root /usr/local/www/zoneminder;
index index.php
gzip off;
location /cgi-bin/nph-zms {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock;
}
location /zm/cache {
alias /var/cache/zoneminder;
}
location /zm {
alias /usr/local/www/zoneminder;
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php-fpm.sock;
}
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
}
location /zm/api/ {
alias /usr/local/www/zoneminder;
rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
}
}
}
Enable and start NGINX
sysrc nginx_enable="YES"
service nginx start
1.3 Install www/fcgiwrap
As NGINX lacks it's own CGI wrapper, we need external one. Please
note that ZoneMinder's montage page use simultaneous access to all
cameras, so you need to use at least as many fcgiwrap workers as
your number of cameras. The following example assumes you have 4.
Enable and start FcgiWrap
sysrc fcgiwrap_enable="YES"
sysrc fcgiwrap_user="www"
sysrc fcgiwrap_socket_owner="www"
sysrc fcgiwrap_flags="-c 4"
1.4 PHP is installed as a dependency to ZoneMinder. However, you should
tweak some of it's settings.
Edit /usr/local/etc/php-fpm.conf and set
listen = /var/run/php-fpm.sock
listen.owner = www
listen.group = www
env[PATH] = /usr/local/bin:/usr/bin:/bin
If you want to set another path for the socket file, make sure you
change it in your NGINX config well. The env[PATH] needs to be set
to locate the zip utility as ZoneMinder's export functions rely on
exec(). Sorry, chroot folks.
PHP throws warning if date.timezone option is not set. The best place
to do it is to create new ini file in /usr/local/etc/php with overrides
date.timezone = "UTC"
Enable and start php-fpm
sysrc php_fpm_enable="YES"
service php-fpm start
1.5 ZoneMinder keeps the last 1-3 frames from monitors as cache when broadcasting
stream through zms. This can be a performance hog if
placed on spindle drive or add wear to SSD. The best practice is put it on
tmpfs. See https://www.freebsd.org/cgi/man.cgi?query=tmpfs for more
information.
ZoneMinder will use /tmp for default. If you plan to change it, see
ZM_PATH_MAP setting.
Edit /etc/fstab and add the following:
tmpfs /tmp tmpfs rw,nosuid,mode=01777 0 0
2. ZoneMinder installation
Connect to MySQL under root and create zm user and populate database.
mysql -u root -p
CREATE DATABASE zm;
GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass';
FLUSH PRIVILEGES;
quit;
mysql -u root -p zm < /usr/local/share/zoneminder/db/zm_create.sql
2.1 If you have chosen to change the ZoneMinder MySQL credentials to something
other than zmuser/zmpass then you must now edit /usr/local/etc/zm.conf. Change
ZM_DB_USER and ZM_DB_PASS to the values you created in the previous step.
Enable and start ZoneMinder
sysrc zoneminder_enable="YES"
service zoneminder start
- If upgrading
- To perform an upgrade from any version:
1. Stop ZoneMinder
service zoneminder stop
2. Upgrade database
sudo -u www zmupdate.pl
3. Start ZoneMinder
service zoneminder start
If you see error ERROR 1419 (HY000) during database update, set
log_bin_trust_function_creators = 1 in runtime or in mysql server config;
For example, login as root and issue SET GLOBAL log_bin_trust_function_creators = 1;
If ZM interface complains about absent configuration parameters, zmupdate.pl script
contains --freshen option to add them.
You can execute it with sudo -u www zmupdate.pl --freshen
Starting from version 1.36, ZM doesn't need too much tmpfs space. zmc process now
allocates memory as needed. tmpfs backed /tmp is still needed by zms to store
1-3 images, so you shrink your tmpfs /tmp drasticallyi (if you followed installation
guide).
- Master Sites:
|
Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
Commit | Credits | Log message |
1.24.4_12 14 Jan 2012 08:57:23 |
dougb |
In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().
In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other. |
1.24.4_12 21 Nov 2011 14:58:09 |
bsam |
Return to the pool since I don't use and ENOTIME to maintain those ports.
Feature safe: yes |
1.24.4_12 13 Nov 2011 17:33:47 |
crees |
Make @dirrms conditional for %%DOCSDIR%% on NOPORTDOCS
PR: ports/162136
Submitted by: 4720@hushmail.com
Approved by: [no rejections from any maintainer within 14 days]
Feature safe: yes |
1.24.4_12 09 Jul 2011 18:55:02 |
bsam |
. update RC script: create procedure zm_prestart() to detect when
mysqld may be used by zoneminder;
. delete 10 seconds sleep;
. bump PORTREVISION.
Submitted by: dougb (thanks!) |
1.24.4_11 06 Jul 2011 15:05:09 |
bsam |
. rename rc script (zm.in -> zoneminder.in); [1]
. add a note to UPDATING;
. bump PORTREVISION.
Suggested by: dougb [1] |
1.24.4_10 06 Jul 2011 14:34:00 |
bsam |
Rework rc script:
. name="zoneminder";
. do load_rc_config at a proper location and remove a second one;
. some whitespace refinement;
. do a 10 seconds pause only at system startup.
Do not bump PORTREVISION for now, it'll be done when the file is renamed.
Submitted by: dougb |
1.24.4_10 05 Jul 2011 21:53:40 |
bsam |
. create status_cmd (rc.d script with option status should work now);
. bump PORTREVISION.
Reported by: achix (at zoneminder forum) |
1.24.4_9 27 Jun 2011 17:34:29 |
bsam |
Remove databases/php5-mysql from BUILD_DEPENDS since the dependency
is already utilized by USE_PHP=mysql. |
1.24.4_9 27 Jun 2011 13:16:04 |
bsam |
Fix an error at I386:
zmwatch[2429].ERR [Shared data size conflict in shared_data for monitor
Monitor-1, expected 328, got 316]
The patch for i386 ($arch should be 32 here but perl uses 64 bit integer):
-----
-our $arch = int(3.2*length(~0));
+our $arch = 32;
-----
I'm not sure how to properly fix this. I'm all ears.
Suggested by: Yury Bushmelev <jay4mail@gmail.com> (via e-mail) |
1.24.4_8 26 Jun 2011 20:06:08 |
bsam |
Remove two dependencies:
. www/mod_perl2 from RUN_DEPENDS (currently port uses only PHP for web);
. security/gnutls from BUILD_DEPENDS (the port is just fine with openssl
from the base system).
Bump PORTREVISION.
Suggested by: Yury Bushmelev <jay4mail@gmail.com> (via e-mail) |
1.24.4_7 24 Jun 2011 22:39:03 |
mm |
Bump due to ffmpeg update to 0.7.1 |
1.24.4_6 16 Jun 2011 18:07:50 |
bsam |
. ZM_V4L2 -> ZM_HAS_V4L2 (at monitorprobe.php); [1]
. == -> = (at configure); [2]
. bump PORTREVISION.
Reported by: pointyhat (via pavmail) [1]
Discussed at: zoneminder forum [1]
Based on: patch by Pavel Timofeev <timp87@gmail.com> [2] |
1.24.4_5 15 Jun 2011 12:44:41 |
bsam |
. add faststart and faststop options to zmpkg script (this enables zoneminder
loading at system startup);
. bump PORTREVISION. |
1.24.4_4 14 Jun 2011 14:35:52 |
bsam |
Refine credits to achix.
Proposed by: achix (full nickname, zoneminder forum) |
1.24.4_4 14 Jun 2011 13:34:53 |
bsam |
Add credits to achix who wrote at least local fbsd camera code by 99,99%.
Discussed with: achix (full nickname, zoneminder forum) |
1.24.4_4 14 Jun 2011 12:43:22 |
bsam |
1. Add some PHP extensions which are needed at runtime:
. json;
. mysql;
. session.
2. Bump PORTREVISION. |
1.24.4_3 12 Jun 2011 08:48:39 |
bsam |
. remove devel/p5-PHP-Serialization dependency (the code uses devel/php5-json);
[1]
. bump PORTREVISION;
. remove empty file from files/ by creating the former while pre-build. [2]
Reported by: Vladimir Pushkar <vladimir.pushkar@gmail.com> (via e-mail) [1]
Suggested by: wen (via e-mail) [2] |
1.24.4_2 09 Jun 2011 10:13:37 |
bsam |
1) The distfile was re-packaged. Changes: [1]
. fix a typo at a debug message;
. the version ID of that file.
2) Bump PORTREVISION.
PR: ports/157650 [1]
Submitted by: Pavel Timofeev <timp87@gmail.com> [1] |
1.24.4_1 05 Jun 2011 18:43:16 |
novel |
Chase security/gnutls update and add an UPDATING entry. |
1.24.4 05 Jun 2011 11:11:35 |
bsam |
. update to version 1.24.4; changelog:
http://www.zoneminder.com/wiki/index.php/Change_History#Release_1.24.4_-_2011.2F05.2F30;
. remove patches that were incorporated upstream;
. add a patch to fix zm_stream.cpp (add one byte to the path length); [1]
. add one more site to MASTER_SITES.
Submitted by: Vladimir Pushkar <vladimir.pushkar@gmail.com> (via email) [1] |
1.24.2_3 03 Jun 2011 00:03:41 |
wen |
- Revert previous commit
Reported by: bsam@ (maintainer) |
1.24.2_3 02 Jun 2011 02:57:59 |
wen |
- Remove zero size file
PR: ports/157174
Submitted by: Alex kozlov <spam@rm-rf.kiev.ua>
Approved by: maintainer(implicit) |
1.24.2_3 25 May 2011 16:26:02 |
bsam |
Add missing header file.
Note: do not bump PORTREVISION since absence of this file prevents
the port from installing (let alone packaging). Unfortunately both my
workstation and tinderbox have got the file while porting and testing...
Reported by: Vladimir Pushkar <vladimir.pushkar@gmail.com> (by email) |
1.24.2_3 24 May 2011 20:27:10 |
bsam |
. do not use hardcoded perl version at the pkg-plist file;
. bump PORTREVISION.
Reported by: Vladimir Pushkar <vladimir.pushkar@gmail.com> (via email) |
1.24.2_2 23 May 2011 22:45:20 |
dougb |
Remove zero-byte files |
1.24.2_2 12 May 2011 13:27:52 |
bsam |
. fix plist (move hardcoded perl version to %%PERL_VERSION%%
and mach to %%PERL_ARCH%%);
. bump PORTREVISION.
Spotted by: pointyhat (via pavmail) |
1.24.2_1 30 Apr 2011 08:52:03 |
bsam |
. use mod_perl2 since apache20 is the default nowadays;
. bump PORTREVISION. |
1.24.2 29 Apr 2011 14:22:37 |
bsam |
Zoneminder is an all-in-one GPL'd security and surveillance camera solution.
Fully web-based system for viewing and analyzing security camera feeds.
WWW: http://www.zoneminder.com/ |