Zoneminder Installation on NethServer 6.6

source: http://www.zoneminder.com/wiki/index.php/CentOS#Zmrepo_-_A_ZoneMinder_repository_for_RPM_based_distros

  1. Install prerequisites for NethServer:

    yum install nethserver-mysqld nethserver-httpd

  2. install zmrepo

    wget http://zmrepo.connortechnology.com/el/6/i386/zmrepo-6-4.el6.noarch.rpm
    yum localinstall --nogpgcheck zmrepo-6-4.el6.noarch.rpm

  3. Install Zoneminder

    yum install zoneminder
    yum remove zmrepo

  4. Configure Mysql db and http

    mysql -e "create database zm"
    mysql -e "grant all on zm.* to ā€˜zmuserā€™ identified by 'YOUR_PASSā€™"
    mysql < /usr/share/zoneminder/db/zm_create.sql
    echo ā€œ/etc/zm.confā€ > /etc/backup-config.d/zoneminder.include

edit /etc/zm.conf

ZM_DB_PASS=ā€˜YOUR_PASSā€™

edit /etc/httpd/conf.d/zoneminder.conf and delete (or edit to restrict the access) the row:

Deny from all # DELETE THIS LINE
  1. start zoneminder

    service zoneminder start
    service httpd restart

Now you can access zm:
http://nethserver/zm

Documentation is available here: http://www.zoneminder.com/wiki/index.php/Documentation

5 Likes

Impressive! Thanks for sharing :smiley:

Did anyone try to install zoneminder on NS7 using this howto already?
Is it hard to do?

For NethServer 7 almost the same procedure can be used, but replacing step 2 with:

yum -y install http://zmrepo.zoneminder.com/el/7/x86_64/zmrepo-7-7.el7.centos.noarch.rpm

On step 4, changing the 4th command to:

echo "/etc/zm/zm.conf" > /etc/backup-config.d/zoneminder.include

and as the conf file now itā€™s on another directory, to change the password edit /etc/zm/zm.conf

ZM_DB_PASS=ā€˜YOUR_PASSā€™

Itā€™s no longer necessary to edit /etc/httpd/conf.d/zoneminder.conf

Step 5 may work as is, but can also be changed to:

systemctl enable zoneminder
systemctl start zoneminder

If this step fails, stop mysqld service and try again, or reboot the computer.

Then open a web browser and navigate to https://server-address/zm, replacing server-address with your serverā€™s FQDN or IP address.

1 Like

thanks. Hopefully Iā€™ll find some time this weekend to give it a try.
Iā€™ll report back when done!

1 Like

Good Morning, interesting thing but on Centos 7 we use MariaDB and not mysql. Is it possible also to make it with MariaDB?

1 Like

Yes, on CentOS7/NethServer7 zoneminder is using mariadb by default

1 Like

As recently there were some questions about ZoneMinder installation Iā€™ve decided to
create a wiki page for ZoneMinder, having this howto as basis. For both, NS6 and NS7.

If you see any error or something missing, please report it or add it to the guide.

3 Likes

Works great, thanks!
Although I messed something up in creating the user (I guess), but deleting user and database and restart fixed it.
Now working on configuring my cams.
(What is easiest way to disable the firewall for testing purposes? ā€˜service shorewall stopā€™?)

Sorry for late reply.
Yes, that should do it (althought some admins will recommend against stopping it, for security reasons).
Note changing nethserver settings might start shorewall.

Zm is running smoothly, now I am trying to find out all capabilities of this suite.
Iā€™ve encountered 1 error so far:
the entries in e.g. logfile are off by 1 hour .
On the main page, it says now (21:37 CET):
Mon 12th Dec, 8:37pm
whereas the link ā€˜logā€™ brings up a window with logentries:
2016-12-12 20:37:55
So. theyā€™re off by one hour.
When looking at live streams of a cam, the time displayed in the capture is right.

Iā€™ve googled for it, and I see answers that you should edit php.ini.
But, there are many ini files parsed by php. And, are any other applications impacted when I edit php.ini (or one of the parsed files).

BTW: just adding my TZ to php.ini and restart apache & zoneminder didnā€™t change the time on the admin-page or logā€¦

Does anyone experience the same?

1 Like

Youā€™re right, same here.

I donā€™t know, we may ask someone from the @dev_team
The value is set to UTC in nethserver.ini template, and it overrides the value you set in php.ini

A possible workaround is a custom template:
mkdir -p /etc/e-smith/templates-custom/etc/php.d/nethserver.ini/
echo ā€˜date.timezone = ā€œYOUR_TIMEZONEā€ā€™ > /etc/e-smith/templates-custom/etc/php.d/nethserver.ini/20timezone
expand-template /etc/php.d/nethserver.ini
systemctl restart httpd

In this way itā€™s workingā€¦ but better wait until we hear from the developers.

Regards.

Edit: no need for a custom template. The php timezone can be set with the command:

config setprop php DateTimezone YOUR_TIMEZONE

Didnā€™t try it yet, but should work.

Did try it.
Had to be followed by
signal-event nethserver-php-update
and I also did a service httpd restart (donā€™t know if it was necessary).
But now the time in ZM is right!
(hopefully I donā€™t find other applications that are now an hour aheadā€¦ :stuck_out_tongue_closed_eyes:

Are you reading my mind? :joy: jk
I was testing it and about to update the guide.
Both commands are necessary. Iā€™ve to test it on NS6.8, but I think itā€™s the same.

Edit: On NethServer 6.8 the php timezone is already set correctly, matching the one from the timezone page in server-manager. Not so on NS7, so maybe you have found a bug :beetle:

/cc @davidep, @filippo_carletti, @giacomo

1 Like

PHP timezone has been reverted to upstream default which is UTC.
The code to set the timezone using the system time was ugly and could cause unexpected behavior.

Rolf solution is the best one.

2 Likes

sorry for my post, was my fault cause i forget the / in Europe/Berlin :frowning:

But now i got a different Problem with that error:

socket_sendto( /var/lib/zoneminder/sock/zms-624329s.sock )

failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php

The error happens after configuring a monitor?

IMO one of the reasons this can occur is when ZoneMinder fails to get the stream from the camera.

Iā€™ve seen the same error when configuring a webcam. In that particular case was due to misconfiguration (wrong capture width/height). So just in case, recheck the monitor parameters are within the manufacturer specs. Surrounding log events might give some clues.

There also are some helpers, like the Probe and Presets links, the zmu command (eg. zmu -d /dev/video0 -qv), or the Hardware Compatibility List.

thanks a lot Marc, i do the setup with the compatibility list. it happens when the camera is moving but after a reboot of the server it works. but also a manual restart from command line did not work. do you have a idea for an app under ios? ZM View with Android works great, with Ios dont get a connect and receive connection errors at the server. Same Configuration as on Android. Have a great Friday !!!

For iOS thereā€™s zmNinja, the official app, for five bucks. But I havenā€™t tried it.

1 Like