Zoneminder on FreeNAS

Status
Not open for further replies.

frozn00

Explorer
Joined
Dec 18, 2014
Messages
57
If anyone is reading this I'd love to get some help if you can. If not I can start a new thread. Thanks :)
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749

frozn00

Explorer
Joined
Dec 18, 2014
Messages
57
Zoneminder ... my favorite subject. Too bad I don't know anything about it, but helped the devs to document installation. It is couple months old, but I hope will help: https://drive.google.com/open?id=0B6clHa5IX562UW5ja3NTbnhvcjQ

Thanks for your helping with this! Your document was the one I followed on page 9 of this thread. After the make install clean I received the error that I listed on page 11 of this thread. Do you mind taking a look at that and help me out? The error happens during the curl-7.50.1 installation. It is on page 11 if you don't mind looking there for the error. Thank you very much. I'd really like to get this installed but I'm kind of stuck at this point at the install screen.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Sorry, not FreeBSD/FreeNAS expert to be able to help with that. Have you tried the pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session?
That should install all you need without building from the ports.
 

frozn00

Explorer
Joined
Dec 18, 2014
Messages
57
Sorry, not FreeBSD/FreeNAS expert to be able to help with that. Have you tried the pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session?
That should install all you need without building from the ports.

I thought the command there looked like what I had typed before and it was the same command that is part of the pdf that I found a few threads back that you wrote. I am going to paste below the results of running that command again "pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session" and then the "make install clean" as being the next step according to the pdf. I still can't get past the curl-7.50.1 GSSAPI_BASE is not compatible with OpenSSL from ports. Use aother GSSAPI options or OpenSSL from base system error. Thank you again for your help.

Code:
root@jail:/usr/ports/ftp/curl # pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Updating database digests format: 100%
Checking integrity... done (5 conflicting)
  - php70-pdo_mysql-7.0.10_1 conflicts with php56-pdo_mysql-5.6.25 on /usr/local/include/php/ext/pdo_mysql/php_pdo_mysql.h
  - php70-gd-7.0.10_1 conflicts with php56-gd-5.6.25 on /usr/local/include/php/ext/gd/gdcache.h
  - php70-session-7.0.10_2 conflicts with php56-session-5.6.25 on /usr/local/include/php/ext/session/php_session.h
  - php70-7.0.10_1 conflicts with php56-5.6.25_1 on /usr/local/bin/php
  - php70-pdo-7.0.10_1 conflicts with php56-pdo-5.6.25 on /usr/local/include/php/ext/pdo/php_pdo.h
Checking integrity... done (0 conflicting)
The following 14 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        zoneminder-1.30.0_3
        php56-gd-5.6.25
        php56-5.6.25_1
        php56-session-5.6.25
        php56-pdo-5.6.25
        php56-pdo_mysql-5.6.25
        php56-mysql-5.6.25
        php56-json-5.6.25
        php56-sockets-5.6.25

New packages to be INSTALLED:
        php70-pdo_mysql: 7.0.10_1
        php70-gd: 7.0.10_1
        php70-session: 7.0.10_2
        php70: 7.0.10_1
        php70-pdo: 7.0.10_1

Number of packages to be removed: 9
Number of packages to be installed: 5

The operation will free 29 MiB.

Proceed with this action? [y/N]: y
[jail] [1/14] Deinstalling zoneminder-1.30.0_3...
[jail] [1/14] Deleting files for zoneminder-1.30.0_3: 100%
[jail] [2/14] Deinstalling php56-json-5.6.25...
[jail] [2/14] Deleting files for php56-json-5.6.25: 100%
[jail] [3/14] Deinstalling php56-sockets-5.6.25...
[jail] [3/14] Deleting files for php56-sockets-5.6.25: 100%
[jail] [4/14] Deinstalling php56-5.6.25_1...
[jail] [4/14] Deleting files for php56-5.6.25_1: 100%
[jail] [5/14] Deinstalling php56-pdo-5.6.25...
[jail] [5/14] Deleting files for php56-pdo-5.6.25: 100%
[jail] [6/14] Deinstalling php56-mysql-5.6.25...
[jail] [6/14] Deleting files for php56-mysql-5.6.25: 100%
[jail] [7/14] Deinstalling php56-gd-5.6.25...
[jail] [7/14] Deleting files for php56-gd-5.6.25: 100%
[jail] [8/14] Deinstalling php56-session-5.6.25...
[jail] [8/14] Deleting files for php56-session-5.6.25: 100%
[jail] [9/14] Deinstalling php56-pdo_mysql-5.6.25...
[jail] [9/14] Deleting files for php56-pdo_mysql-5.6.25: 100%
[jail] [10/14] Installing php70-7.0.10_1...
[jail] [10/14] Extracting php70-7.0.10_1: 100%
[jail] [11/14] Installing php70-pdo-7.0.10_1...
[jail] [11/14] Extracting php70-pdo-7.0.10_1: 100%
[jail] [12/14] Installing php70-pdo_mysql-7.0.10_1...
[jail] [12/14] Extracting php70-pdo_mysql-7.0.10_1: 100%
[jail] [13/14] Installing php70-gd-7.0.10_1...
[jail] [13/14] Extracting php70-gd-7.0.10_1: 100%
[jail] [14/14] Installing php70-session-7.0.10_2...
[jail] [14/14] Extracting php70-session-7.0.10_2: 100%
Message from php70-pdo-7.0.10_1:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-20-pdo.ini
configuration file to automatically load the installed extension:

extension=pdo.so

****************************************************************************
Message from php70-pdo_mysql-7.0.10_1:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-30-pdo_mysql.ini
configuration file to automatically load the installed extension:

extension=pdo_mysql.so

****************************************************************************
Message from php70-gd-7.0.10_1:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-20-gd.ini
configuration file to automatically load the installed extension:

extension=gd.so

****************************************************************************
Message from php70-session-7.0.10_2:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-18-session.ini
configuration file to automatically load the installed extension:

extension=session.so

****************************************************************************
root@jail:/usr/ports/ftp/curl # pkg info zoneminder
pkg: No package(s) matching zoneminder
root@jail:/usr/ports/ftp/curl # cd /usr/ports/multimedia/zoneminder/
root@jail:/usr/ports/multimedia/zoneminder # make install clean
===>   zoneminder-1.30.0_3 depends on package: p5-DBI>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-DBD-mysql>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-Date-Manip>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-Test-LWP-UserAgent>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-Sys-Mmap>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-LWP-Protocol-https>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-Sys-CPU>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-Sys-MemInfo>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-Data-Dump>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-SOAP-WSDL>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-Data-UUID>=0 - found
===>   zoneminder-1.30.0_3 depends on package: p5-IO-Socket-Multicast>=0 - found
===>   zoneminder-1.30.0_3 depends on executable: ffmpeg - found
===>   zoneminder-1.30.0_3 depends on file: /usr/local/include/linux/videodev2.h - found
===>   zoneminder-1.30.0_3 depends on file: /usr/local/bin/cmake - not found
===>   cmake-3.6.1 depends on executable: sphinx-build - found
===>   cmake-3.6.1 depends on shared library: libcurl.so - not found
===>  curl-7.50.1 GSSAPI_BASE is not compatible with OpenSSL from ports. Use
other GSSAPI options or OpenSSL from base system.
*** [install] Error code 1

Stop in /usr/ports/ftp/curl.
*** [lib-depends] Error code 1

Stop in /usr/ports/devel/cmake.
*** [install] Error code 1

Stop in /usr/ports/devel/cmake.
*** [build-depends] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
*** [install] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
root@jail:/usr/ports/multimedia/zoneminder #
 

frozn00

Explorer
Joined
Dec 18, 2014
Messages
57
I just tried the command again, adding the cmake to the end of the command:

pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session cmake

I think I might be getting somewhere as the results of that command was:

Code:
root@jail:/usr/ports/multimedia/zoneminder # pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session cmake
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 15 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        zoneminder: 1.30.0_3
        cmake: 3.6.1
        php56-gd: 5.6.25
        php56: 5.6.25_1
        php56-json: 5.6.25
        php56-session: 5.6.25
        php56-pdo_mysql: 5.6.25
        php56-mysql: 5.6.25
        php56-pdo: 5.6.25
        php56-sockets: 5.6.25
        jsoncpp: 1.7.3
        curl: 7.50.1
        cmake-modules: 3.6.1
        libarchive: 3.2.1,1
        liblz4: 131

Number of packages to be installed: 15

The process will require 78 MiB more space.
7 MiB to be downloaded.

Proceed with this action? [y/N]: y
[jail] Fetching cmake-3.6.1.txz: 100%    4 MiB   4.0MB/s    00:01
[jail] Fetching jsoncpp-1.7.3.txz: 100%  158 KiB 162.1kB/s    00:01
[jail] Fetching curl-7.50.1.txz: 100%    2 MiB   2.3MB/s    00:01
[jail] Fetching cmake-modules-3.6.1.txz: 100%  555 KiB 567.8kB/s    00:01
[jail] Fetching libarchive-3.2.1,1.txz: 100%  668 KiB 683.8kB/s    00:01
[jail] Fetching liblz4-131.txz: 100%   63 KiB  64.2kB/s    00:01
Checking integrity... done (5 conflicting)
  - php56-gd-5.6.25 conflicts with php70-gd-7.0.10_1 on /usr/local/include/php/ext/gd/gdcache.h
  - php56-5.6.25_1 conflicts with php70-7.0.10_1 on /usr/local/bin/php
  - php56-session-5.6.25 conflicts with php70-session-7.0.10_2 on /usr/local/include/php/ext/session/php_session.h
  - php56-pdo_mysql-5.6.25 conflicts with php70-pdo_mysql-7.0.10_1 on /usr/local/include/php/ext/pdo_mysql/php_pdo_mysql.h
  - php56-pdo-5.6.25 conflicts with php70-pdo-7.0.10_1 on /usr/local/include/php/ext/pdo/php_pdo.h
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 20 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        php70-7.0.10_1
        php70-pdo-7.0.10_1
        php70-pdo_mysql-7.0.10_1
        php70-gd-7.0.10_1
        php70-session-7.0.10_2

New packages to be INSTALLED:
        php56: 5.6.25_1
        php56-mysql: 5.6.25
        php56-pdo: 5.6.25
        liblz4: 131
        php56-gd: 5.6.25
        php56-json: 5.6.25
        php56-session: 5.6.25
        php56-pdo_mysql: 5.6.25
        php56-sockets: 5.6.25
        jsoncpp: 1.7.3
        curl: 7.50.1
        cmake-modules: 3.6.1
        libarchive: 3.2.1,1
        zoneminder: 1.30.0_3
        cmake: 3.6.1

Number of packages to be removed: 5
Number of packages to be installed: 15

The process will require 61 MiB more space.

Proceed with this action? [y/N]: y
[jail] [1/20] Deinstalling php70-pdo_mysql-7.0.10_1...
[jail] [1/20] Deleting files for php70-pdo_mysql-7.0.10_1: 100%
[jail] [2/20] Deinstalling php70-pdo-7.0.10_1...
[jail] [2/20] Deleting files for php70-pdo-7.0.10_1: 100%
[jail] [3/20] Deinstalling php70-gd-7.0.10_1...
[jail] [3/20] Deleting files for php70-gd-7.0.10_1: 100%
[jail] [4/20] Deinstalling php70-session-7.0.10_2...
[jail] [4/20] Deleting files for php70-session-7.0.10_2: 100%
[jail] [5/20] Deinstalling php70-7.0.10_1...
[jail] [5/20] Deleting files for php70-7.0.10_1: 100%
[jail] [6/20] Installing php56-5.6.25_1...
[jail] [6/20] Extracting php56-5.6.25_1: 100%
[jail] [7/20] Installing php56-mysql-5.6.25...
[jail] [7/20] Extracting php56-mysql-5.6.25: 100%
[jail] [8/20] Installing php56-pdo-5.6.25...
[jail] [8/20] Extracting php56-pdo-5.6.25: 100%
[jail] [9/20] Installing liblz4-131...
[jail] [9/20] Extracting liblz4-131: 100%
[jail] [10/20] Installing php56-gd-5.6.25...
[jail] [10/20] Extracting php56-gd-5.6.25: 100%
[jail] [11/20] Installing php56-json-5.6.25...
[jail] [11/20] Extracting php56-json-5.6.25: 100%
[jail] [12/20] Installing php56-session-5.6.25...
[jail] [12/20] Extracting php56-session-5.6.25: 100%
[jail] [13/20] Installing php56-pdo_mysql-5.6.25...
[jail] [13/20] Extracting php56-pdo_mysql-5.6.25: 100%
[jail] [14/20] Installing php56-sockets-5.6.25...
[jail] [14/20] Extracting php56-sockets-5.6.25: 100%
[jail] [15/20] Installing jsoncpp-1.7.3...
[jail] [15/20] Extracting jsoncpp-1.7.3: 100%
[jail] [16/20] Installing curl-7.50.1...
[jail] [16/20] Extracting curl-7.50.1: 100%
[jail] [17/20] Installing cmake-modules-3.6.1...
[jail] [17/20] Extracting cmake-modules-3.6.1: 100%
[jail] [18/20] Installing libarchive-3.2.1,1...
[jail] [18/20] Extracting libarchive-3.2.1,1: 100%
[jail] [19/20] Installing zoneminder-1.30.0_3...
[jail] [19/20] Extracting zoneminder-1.30.0_3: 100%
[jail] [20/20] Installing cmake-3.6.1...
[jail] [20/20] Extracting cmake-3.6.1: 100%
Message from php56-mysql-5.6.25:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-20-mysql.ini
configuration file to automatically load the installed extension:

extension=mysql.so

****************************************************************************
Message from php56-pdo-5.6.25:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-20-pdo.ini
configuration file to automatically load the installed extension:

extension=pdo.so

****************************************************************************
Message from php56-gd-5.6.25:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-20-gd.ini
configuration file to automatically load the installed extension:

extension=gd.so

****************************************************************************
Message from php56-json-5.6.25:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-20-json.ini
configuration file to automatically load the installed extension:

extension=json.so

****************************************************************************
Message from php56-session-5.6.25:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-18-session.ini
configuration file to automatically load the installed extension:

extension=session.so

****************************************************************************
Message from php56-pdo_mysql-5.6.25:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-30-pdo_mysql.ini
configuration file to automatically load the installed extension:

extension=pdo_mysql.so

****************************************************************************
Message from php56-sockets-5.6.25:
****************************************************************************

The following line has been added to your /usr/local/etc/php/ext-20-sockets.ini
configuration file to automatically load the installed extension:

extension=sockets.so

****************************************************************************
Message from zoneminder-1.30.0_3:
ZoneMinder is a free, open source Closed-circuit television software
application developed for Unix-like operating systems which supports
IP, USB and Analog cameras.

New installs
============

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/mysql56-server or newer
        You may choose your favourite method - ports or packages here.
        FreeBSD default setting use STRICT_TRANS_TABLES sql_mode. It's mandatory to disable it. Edit your my.cnf accordingly

        The following SQL mode should be compatible with ZM:
                sql_mode= NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

        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.

        Your server block should include the following:

                server {
                                root /usr/local/www/zoneminder;
                                try_files $uri $uri/ /index.php$is_args$args;
                                index index.php;

                                location = /cgi-bin/nph-zms {
                                                include fastcgi_params;
                                                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
                                                fastcgi_pass    unix:/var/run/fcgiwrap/fcgiwrap.sock;
                                }

                                location ~ \.php$ {
                                                include fastcgi_params;
                                                fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                                                fastcgi_pass    unix:/var/run/php-fpm.sock;
                                }

                                location /api {
                                                rewrite ^/api/(.+)$ /api/index.php?p=$1 last;
                                }
                }

1.2.1 ZoneMinder has it's own authentication system, however it's recommend to use NGINX basic
        auth over HTTPS if you don't need fine grain control to ZoneMinder components.

1.2.2 If you choose ZoneMinder authentication, it's recommended to prohibit access to
        image and events folder as it's possible to guess file names inside it.

        location ~ ^/(?:images|events)/ {
                deny all;
        }

        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_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 constantly keeps the last N frames from its cameras to
        preserve them when alarm occurs. This can be a performance hog if
        placed on spindle drive. 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.

        Mapping /tmp to tmpfs is actually a recommended step under FreeBSD.
        Edit /etc/fstab and add the following:

                tmpfs                   /tmp            tmpfs   rw,nosuid,mode=01777    0       0

        The size of temporary files depends on your number of cameras
        number and frames you plan to keep. My 12 3Mbit cameras with 25
        last frames consumes 6 GB.

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

Upgrades
========

1. Stop ZoneMinder
        service zoneminder stop

2. Upgrade database
        sudo -u www zmupdate.pl

3. Start ZoneMinder
        service zoneminder start
root@jail:/usr/ports/multimedia/zoneminder #
 

frozn00

Explorer
Joined
Dec 18, 2014
Messages
57
In following the PDF, I did a make install clean as stated below and I get the following error eventually during the installation:

Code:
root@jail: cd /usr/ports/multimedia/zoneminder
root@jail: make install clean

***********LOTS OF TEXT ABOVE**************
Installing /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/onvif/proxy/output/usr/local/lib/perl5/site_perl/man/man3/ONVIF::Analytics::Types::MetadataInput.3
Installing /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/onvif/proxy/output/usr/local/lib/perl5/site_perl/man/man3/ONVIF::Media::Types::IntRange.3
Installing /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/onvif/proxy/output/usr/local/lib/perl5/site_perl/man/man3/ONVIF::Media::Elements::GetVideoEncoderConfigurationsResponse.3
Installing /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/onvif/proxy/output/usr/local/lib/perl5/site_perl/man/man3/ONVIF::pTZ::Types::MotionExpression.3
[ 36%] Built target zmonvifproxy
1 error
*** [all] Error code 2
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
*** [install] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
root@jail:/usr/ports/multimedia/zoneminder #
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Sorry, can't tell you what your problem is. Just created a FreeBSD VM and installed with pkg without any issues. You will need to reach out to the devs on this one.
 

frozn00

Explorer
Joined
Dec 18, 2014
Messages
57
Sorry, can't tell you what your problem is. Just created a FreeBSD VM and installed with pkg without any issues. You will need to reach out to the devs on this one.

Thank you very much for trying to help me. How would I go about getting more help with this? I would rather not private message a developer because I think having the issue hashed out here may help others with the same issue. Hopefully a developer will read this and can give me some advice. Thank you again for your time!
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
My pleasure. Just a last thought: If you are trying this on a jail, create a fresh one and restart. Maybe during your attempts you've corrupted something. Also do the install with pkg. Good luck!
 

frozn00

Explorer
Joined
Dec 18, 2014
Messages
57
Still struggling with this guys. If a dev can look at the error and possibly help me I would really appreciate it! I am following the PDF that mellona mentioned (https://drive.google.com/file/d/0B6clHa5IX562UW5ja3NTbnhvcjQ/view) and I am at:

Code:
pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session


then

Code:
make install clean


then I get this error

*****lots of stuff above this line******
Code:
/ZoneMinder-1.30.0/scripts/ZoneMinder/output/usr/local/lib/perl5/site_perl/man/man1  blib/man3 /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/scripts/ZoneMinder/output/usr/local/lib/perl5/site_perl/man/man3
/usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/src/zm_local_camera.cpp: In static member function 'static bool LocalCamera::GetCurrentSettings(const char*, char*, int, bool)':
/usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/src/zm_local_camera.cpp:1333: error: 'ENODATA' was not declared in this scope
/usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/src/zm_local_camera.cpp:1517: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'v4l2_std_id'
/usr/ports/multimedia/zoneminder/work/ZoneMinder-1.30.0/src/zm_local_camera.cpp:1523: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'v4l2_std_id'
*** [src/CMakeFiles/zm.dir/zm_local_camera.cpp.o] Error code 1
1 error
*** [src/CMakeFiles/zm.dir/all] Error code 2
1>/dev/null /usr/local/bin/perl -MExtUtils::Command::MM -e 'warn_if_old_packlist' --  /usr/local/lib/perl5/5.20/mach/auto/ZoneMinder
1>/dev/null true
[  3%] Built target zmperlmodules
1 error
*** [all] Error code 2
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
*** [install] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
root@jail:/usr/ports/multimedia/zoneminder #


I've been stuck on this for days and I am not able to find anything about this :/
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
There is no reason for you do be doing make install clean after you've already installed the package. There are two alternative methods of installing the software--compiling it from source using the ports tree (which does use the make install clean command) and installing binary packages using the pkg install command. There's ordinarily no reason to do both.
 

abi

Cadet
Joined
Jun 16, 2016
Messages
4
He is compiling curl with wrong options.
BTW, anyone interested to land zoneminder with h264 backend support to the port tree?
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749

JGS000

Dabbler
Joined
Oct 6, 2016
Messages
14
Great! Thanks for the feedback!

UUUUHGGGG! ----RANT about neckbeards/unixmonkeys redacted /RANT

Soooooo.....

Now that I HAD ZM working, I decided to reconfigure the box it was on to optimize the hardware and reinstalled FreeNAS. Worked like a dream. I mean this thing is better,stronger faster and I am all proud of myself. Then, I created my jail and updated pkg and ports and went through the old Zoneminder install.
....and none of it works! apparently most of the dependencies have all been changed, basically OVERNIGHT, because.....reasons. AWESOME.
 

JGS000

Dabbler
Joined
Oct 6, 2016
Messages
14
OKAY... I spent the last 5 hours reinstalling ZM by hand using all 5.6 packages and it runs.... disregard RANT_/RANT above
 
Last edited:

JGS000

Dabbler
Joined
Oct 6, 2016
Messages
14
update ... humble apologies to all: This thread has helped me immensely, being completely NOOB to FreeNAS and Zoneminder. I installed ZM on a dedicated FreeBSD 10.3 box just now and it worked as described, step by step from melloa's guide, including the php 7.0. support.
I did, however, create my own nginx.conf using the guide as reference.
Thanks to all, especially abi and company for updating the BSD port for Zoneminder!
 

StephenRadford

Dabbler
Joined
Apr 18, 2016
Messages
21
hi all, I am new to this so I need it explained in "baby steps" please. This is what I have done so far. Freenas 10.3-stable is installed and I created a jail called CCTV_recorder. I have followed your steps above, the port updated but no Apache installed and I got "/usr/ports/Mk/bad.port.mk", line 1148:UNMAE_r (10.3-STABLE) and osversion (902001) do not agree on major version number."
I got lost with what JGS000 was doing.
I tried "pkg install zoneminder nginx mysql56-server php70-pdo_mysql php70-gd fcgiwrap php70-session"
and got back "0 package updated, 0 removed and 25475 added"
Any help will be gratefully received.
 

Caffe Mocha

Explorer
Joined
Aug 3, 2013
Messages
69
Thanks for the guide, I have successful installed zoneminder in freenas jail. but i bumped into a problem. (videos not streaming)
getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-631180s.sock ) failed: No such file or directory - checkStreamForErrors()

I have tried to solve the problem in Ubuntu and Apache by changing zm path and enable CGI.
but i have no idea how to solve the problem with freebsd and nginx. tried to google for some hints but have yet to found a solution.
Helps will be much appreciated
 
Status
Not open for further replies.
Top