ZoneMinder: Tools to monitor with security cameras in Linux

ZoneMinder is a set of applications, tools that allow us to control, monitor our security cameras, surveillance.

video camera

What is ZoneMinder?

As I just said, it is a set of tools that help us to monitor, control our security cameras. It is made up of several scripts (perl, etc), as well as a web interface (PHP) that makes the whole process more user-friendly.

Suppose we have a business and acquire several surveillance cameras in a local store, or it may be the surveillance system of a communications node, the fact is that we need a system that allows us to see what is happening in the premises we monitor, through simple and intuitive options we can start or stop recording, rotate the camera (if the hardware supports it), etc.

Here are several screenshots of ZoneMinderWell, as they say around here, a picture is worth a thousand words:

ZoneMinder Installation

First of all, I recommend that you access the ZoneMinder Wiki, as they must take into account compatibility between the hardware they have with the system they will install.

In the same wiki there are excellent installation guides for Ubuntu y CentOS, we will take as an example the guide of Ubuntu 14.04 with ZoneMinder 1.28.1:

First we must have an environment installed LAMP, that is, Apache, MySQL and PHP. I will not stop at this, because here in the Blog we have already put several tutorials for it.

Then we will edit the MySQL configuration file, to make a change and then restart the service:

sudo nano /etc/mysql/my.cnf

We add the following under [mysql]:

innodb_file_per_table

Then we restart MySQL:

sudo service mysql restart

We also need to enable the Apache cgi module, which is not activated by default:

a2enmod cgi

And we restart Apache:

sudo service apache2 restart

Now we will add the ZoneMinder repository and install it:

sudo add-apt-repository ppa: iconnor / zoneminder sudo apt-get update sudo apt-get install zoneminder

If there are messages asking something or waiting for confirmation about something, just press Ok or Accept.

Installation of extra packages required by ZoneMinder

Also, we will need to install some extra packages:

sudo apt-get install libvlc-dev libvlccore-dev vlc

Also, we'll edit the MySQL daemon startup file to specify that it wait a few seconds before launching the service:

sudo nano /etc/init.d/mysql

There we add under 'start) ó start () { following:

Sleep 15

It can look like this:

start () {sleep 15 echo -n "Starting $ prog:"

Now let's go on to configure Apache, we must create a directory (in case it does not exist) inside which, we will put two files (symbolic links actually):

sudo mkdir /etc/apache2/conf.d sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf sudo ln -s /etc/zm/apache.conf / etc / apache2 /conf-enabled/zoneminder.conf

Let's add the user www-data (which is the user with which Apache interacts with the system) to the video group:

sudo usermod -a -G video www-data

Ready, we can restart Apache:

sudo service apache2 restart

Now we can open the web interface by accessing: http://direccion-ip/zm/

That is, we put the IP address of the server where we just installed ZoneMinder, or the subdomain (Ex: camaras.minegocio.com)

zoneminder

Once inside the PHP interface, you can configure, add cameras and everything with simple options, at the click of a button 😉

Conclusions about ZoneMinder

Personally, whatever it takes to increase security, no matter how paranoid he may seem, I support him. When you have a Node or even more, a DataCenter, security is never little or enough.

You can have excellent security through software, in fact not recently we leave some tips, but it is useless to have an excellent firewall, complex access passwords, if physical access is not controlled by security cameras, for not having physical barriers or a perimeter security system.

By the way… ZoneMinder is on GitHub 😀

ZoneMinder on GitHub


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

24 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   DMoZ said

    Excellent brother, just what I was looking for: D.

    Now I just hope my hardware is compatible.

    1.    KZKG ^ Gaara said

      A pleasure 🙂

  2.   sinnermann said

    G
    R
    A
    C
    I
    A
    S

    1.    KZKG ^ Gaara said

      Thanks to you for commenting 🙂

  3.   Mario Guillermo Zavala said

    That is so easy and interesting you have to put it into practice ,,,,

  4.   NauTiluS said

    Great set of tools in one.

    It will cost me to try it with a pi rapper, to see how it works.

  5.   Antonio said

    The comments are repeated, but thank you very much !! I have problems with English and this helps me a lot.
    : )

  6.   gonzalezmd (# Bik'it Bolom #) said

    Thanks for sharing.

  7.   Anonymous said

    Would that work with a DVR? That is, you have 4 cameras connected to a DVR that records all day. Could Zone Minder be configured to access that DVR, view the recordings, etcetera?

  8.   Rafael said

    good there luis .. successes

  9.   louis said

    Thanks, I'm liking what I'm seeing, I'll test it to see how it works on the raspberry pi

  10.   serfravirs said

    Very interesting, I was wondering if such a thing existed; this gives me very interesting options. Thank you.

  11.   Antonio said

    Hello, I am following the manual and I have a question.
    In this script /etc/init.d/mysql that starts the mysql service, I have to delay the service for 15 seconds, but I don't know where to add these lines of code, it is not clear to me.

    start () {
    Sleep 15
    echo -n "Starting $ prog:"

    case «$ {1: -»} »in
    'start')
    sanity_checks;
    # Start daemon
    log_daemon_msg "Starting MySQL database server" "mysqld"
    if mysqld_status check_alive nowarn; then
    log_progress_msg "already running"
    log_end_msg 0
    else
    # Could be removed During boot
    test -e / var / run / mysqld || install -m 755 -o mysql -g root -d $

    # Start MySQL!
    / usr / bin / mysqld_safe> / dev / null 2> & 1 &

    # 6s was reported in # 352070 to be too few when using ndbclus $
    for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
    Sleep 1
    if mysqld_status check_alive nowarn; then break; fi
    log_progress_msg "."
    done
    if mysqld_status check_alive warn; then

  12.   Criss said

    Good tuto, thanks, now I would like to know which perl script is the one that is executed when an event or alarm is triggered, and the path to the file in Ubuntu 14.04, this is to make some modifications to the script

  13.   cutemar said

    I have a standalone dvr with 16 cameras and I would like to view and record through the zoneminder ubuntu lubuntu 14.04 as a faço to add cameras to the dvr

  14.   Donald raggs said

    This is a great tool to deter crime. This set of applications are very useful for all kinds of security management of the business organization. I like that it is all the features.

  15.   Luis Muñoz said

    Greetings, I hope someone could help with my problem, I already installed it and I have followed the steps, however I have reached the time to load the zoneminderhttp://localhost/zm) and this sends me an error:

    Unable to connect to ZM db.SQLSTATE [HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    I hope someone could give me a little light on the matter, I am starting to use linux and now at this moment I do not know what to do.

  16.   Security cameras said

    Very good post! Now it is clear to me

  17.   sandra said

    Very good information !!, I will finally be able to install the security camera !!
    thanks!

  18.   sp said

    A query does this program support analog and ip cameras? at the same time?

    1.    Speed ​​dating Barcelona said

      It has worked for me with my analog camera!

  19.   Lenin Hernandez said

    Hello, here is more information to complement the topic about installing, configuring and implementing ZoneMinder in Debian Linux
    https://leninmhs.com.ve/instalacion-configuracion-zoneminder/

  20.   leonidas83glx said

    I make a query, does this program also allow access to DVR recorders ??? I need something with which I can access a generic Chinese DVR model 6004H, the same when I enter from a browser on my Linux PC asks me to download an ActiveX driver to access it. I have looked around for it and there is no case, without that damn microsoft control I cannot see the cameras of my DVR in Linux.
    It is terrible that device manufacturers leave GNU / Linux users behind !!!

    1.    leonidas83glx said

      Well, I check with horror that after a year no one has answered my query. I still cannot use my generic Chinese network DVR because it forces me to install the obsolete ActiveX control that does not even work in Ruindows anymore, so I am left with a nail device (which they sold me with the promise of being able to watch on the network local and online my cameras).