Installing Ubuntu 10.04 with ZoneMinder 1.24 on Hyper-V

26 May

I decided I need to cut down the number of servers I run at home, yet again. ZoneMinder currently sits on its own Ubuntu box and so I thought I’d create a Hyper-V server and then create a few VM’s on there, one for ZoneMinder, one for websites and possibly a few others.

It was a lot simpler that I thought to get it up and running, here are the steps I took:

Firstly download Hyper-V Server R2 and install it on a box.

Then, downloaded Ubuntu Desktop ISO 10.04 here.

Create a new machine in Hyper-V and then insert the Ubuntu ISO in the drive and start the VM.

I used the guide here again, but changed it slightly.

Edit the /etc/apt/sources.list to include mulitverse and universe repositories by adding this line:

deb dapper main restricted multiverse universe

Then, update and upgrade and reboot the system:

sudo apt-get update

sudo apt-get upgrade

Then install Apache, php and MySQL:

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

Then, install the following applications and libraries:

sudo apt-get install ffmpeg libarchive-tar-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl

sudo apt-get install libjpeg62 libmime-perl libstdc++6 libwww-perl zlib1g

Then download the .deb file:


Then install it with the following command:

sudo dpkg -i zoneminder_1.24.2-1_i386.deb

There were a few error, so run this to automagically fix them:

sudo apt-get -f install

The run some configuration commands:

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

sudo /etc/init.d/apache2 force-reload

Then add www-data to the video group:

sudo adduser www-data video

Now you can access the ZoneMinder by navigating to:


I then added in the Perl script to control the Foscam cameras (see my other post here) and that was it, it worked first time.

I also changed the website to run from the root (so no /zm/ required) by editing the “etc/apache2/sites-available/default” file and changing “DocumentRoot” from “/var/www/” to “/usr/share/zoneminder/”

After that it was just a case of setting the IP address by effectively editing the network adaptor configuration file:

sudo gedit /etc/network/interfaces

Replace the txt with:

auto lo eth0
iface lo inet loopback
iface eth0 inet static
address your ip here)
gateway gateway ip here)
then change your DNS servers

Then to edit the DNS servers run:

sudo gedit /etc/resolv.conf

And add in the line:

nameserver x.x.x.x

Then, restart the network interface card by typing:

sudo /etc/init.d/networking restart

Job done. now its just a case of adding in my cameras and I’m away.