Ubuntu Server 12.04 64-bit with Zoneminder 1.26.4 the easy way

From ZoneMinder Wiki
Jump to: navigation, search

Zoneminder has been upgraded to 1.26.5.

Updated Procedures here> [1]


Zoneminder 1.26.4-3 on Ubuntu 12.04 64 BIT and 32 BIT


Note: This has also been tested with 12.04 32 BIT.

Note 1: This also works for Ubuntu 13.04 server.

Note 2: I have tested this on Ubuntu Desktop versions 12.04 and 13.04. You will have to install tasksel before trying to install LAMP. The purpose of this was to use Teamviewer to remote control a PC behind multiple firewalls where the client was not able to do dynamic DNS or port forwarding.

Note 3: On November 3, 2013 there was an update to Zoneminder on the Launchpad PPA repository from 1.26.4-2 to 1.26.4-3. If you have installed this before this date you can do an upgrade to the new version with: apt-get update then apt-get upgrade. The install script will try to stop your Zoneminder but it is a good idea to stop it beforehand.

Install Ubuntu


Install Basic Server (if you used the mini.iso), OpenSSH Server, and LAMP Server

Log in then become root:

sudo su
apt-get update
apt-get upgrade
apt-get dist-upgrade


Optional: Set static IP address


nano /etc/network/interfaces

Make changes similar to this:

auto eth0
iface eth0 inet static
  address 192.168.1.10
  netmask 255.255.255.0
  gateway 192.168.1.1
  dns-nameservers 192.168.1.1

Note: for Ubuntu 12.04 the resolv.conf is dynamically assigned. The "dns-servers" entry in the interfaces file will set the DNS Multiple DNS server entries can be used.

Reboot server


Install PPA Repository for Zoneminder 1.26.4-2


apt-get install python-software-properties
add-apt-repository ppa:iconnor/zoneminder
apt-get update


InstallZoneminder


apt-get install zoneminder


Optional install H.264


apt-get install x264


Add delay to allow MySQL to start before Zoneminder


nano /etc/init.d/zoneminder

Add above "zmfix -a" sleep 15

Ctrl+o Enter to save

CTRL+x to exit


Link Apache to Zoneminder


ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
/etc/init.d/apache2 force-reload 
adduser www-data video


Install Cambozola


cd /usr/src && wget http://www.andywilcock.com/code/cambozola/cambozola-latest.tar.gz
tar -xzvf cambozola-latest.tar.gz

replace 935 with cambozola version downloaded

cp cambozola-0.935/dist/cambozola.jar /usr/share/zoneminder


Optional Add SSL to Apache2


Create a self-signed certificate:

make-ssl-cert generate-default-snakeoil --force-overwrite

It creates the following files:

   /etc/ssl/private/ssl-cert-snakeoil.key
   /etc/ssl/certs/ssl-cert-snakeoil.pem

Activate Apache SSL module:

a2enmod ssl

Activate Apache default ssl virtual host:

a2ensite default-ssl

Restart Apache:

service apache2 restart


You should now be able to access the web server using https://servername


NTP Daily Sync


nano /etc/cron.daily/ntpdate

Copy the following into nano

!/bin/sh ntpdate ntp.ubuntu.com

Ctrl+o Enter to save

CTRL+x to exit

chmod 755 /etc/cron.daily/ntpdate


Open Zoneminder in web browser


http://serverip/zm

Click Options

Uncheck: Check with zoneminder.com for updated versions (?) click Save

Click Images tab

check Is the (optional) cambozola java streaming client installed (?) Click Save


Reboot server to insure Zoneminder starts on boot.