How To Setup Your Own Camera Security with ZoneMinder on Ubuntu 10

You know how it is, we need some kind of security in out homes but the camera security systems that are out there are expensive and use proprietary software. Being the geeks we are how about an open source solution that works with cameras out there and allows you to have your own DVR security system.

In this post we will cover using ZoneMinder on Ubuntu 10.04. ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine.

So let’s get started. First step is to install Ubuntu 10.04 LTS Server yet, I opted for the 32 bit version and installed the base server and accepted the defaults.

Next we will need to install openssh-server and ZoneMinder.

$ sudo apt-get install openssh-server
 $ sudo apt-get install zoneminder

All of the supporting cast will be installed at this point (Apache, MySQL). No we need to make a few changes to the kernel memory parameters.

At the end of /etc/sysctl.conf, add:

kernel.shmall = 512000
kernel.shmmax = 1000000000

Those numbers worked for my 2 GB Ram setup. That .shmmax is 1GB, or half of my RAM. Be sure that your .shmmax does not exceed the RAM in your machine. There are several posts on this shared memory issue in the ZoneMinder wiki.

Load the changes

$ sudo sysctl -p

Now we will need to make a few changes so that Apache sees and displays ZoneMinder.

First, you will need to edit /etc/zm/apache.conf. Add after the Alias /zm line, or else your streaming won’t work, since the html produced by ZoneMinder expects /cgi-bin to be at the top of your Apache website.

ScriptAlias /cgi-bin /usr/share/zoneminder/cgi-bin

Then, link the zoneminder apache.conf into the apache configuration:

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

Restart Apache for things to work.

$ sudo /etc/init.d/apache2 restart

Now we need to start zoneminder up.

$ sudo /etc/init.d/zoneminder start

Now lets open a browser and take a look at the interface. <system_ip>/zm/index.php

zm1Now we have a working installation. Next we will need to create monitors and add some cameras. Which will be covered in part 2 of this post.

Leave a Reply

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