Ubuntu Server 18.04 64-bit with Zoneminder 1.30.4 the easy way

From ZoneMinder Wiki
Revision as of 10:20, 14 October 2013 by Bbunge (talk | contribs)
Jump to navigationJump to search

Zoneminder 1.25.0 on Ubuntu 12.04 64-bit

This installation uses Zoneminder from the Ubuntu sources. Zoneminder in Ubuntu since the 11.10 version is compiled with the mmap option. I am running an Optiplex 755 with a dual core processor, 6 GIG RAM and 160 GIG hard drive. I have 11 Linksys IP cameras and a Vivotek IP camera with Modect operational. I have run this install and have set up the 12 cameras in about an hour!

Note: While not tested this should work for 32 BIT as well

Note2: These instructions work on Ubuntu Server 12.10 32-bit under VirtualBox 4.1.22 (host: Windows 7 Pro SP1), with 512MB RAM 8 GB HD. Tested with one IP camera (IP-400 camera from DealExtreme). (28-Oct-2012/ktt)

Note3: This setup also works with Ubuntu desktop. You will have to install tasksel to install all the LAMP packages. One advantage of this is that you can install Teamviewer or another remote control package to access your Zoneminder without dynamic DNS or port forwarding. This is useful if your installation is behind multiple firewalls/routers.

Install Ubuntu

There are plenty of sources for instructions on how to install Ubuntu.

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

Reboot 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 68.87.75.194

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.

Ctrl+o Enter to save
CTRL+x to exit

Reboot server

From this point on I used Putty from another PC to configure the server.

Install Zoneminder

Log in then become root

sudo su
apt-get install zoneminder

Note: You will be prompted to configure Nullmailer during the Zoneminder install. You can leave the program un-configured if you do not plan to have the server email alerts. Or search for instructions to configure Nullmailer.

Add the H.264 packages if wanted.

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

Optional Install Cambozola

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

replace "93" with cambozola version downloaded

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

Optional Add SSL to Apache2

Create a self-signed certificate:

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

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://serverip

NTP Daily Sync

nano /etc/cron.daily/ntpdate

Copy the following two lines into nano

#!/bin/sh
ntpdate ntp.ubuntu.com

Note: replace ntp.ubuntu.com with the time server(s) of your choice. I use time-a.nist.gov time-b.nist.gov

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

Optional: check "Is the (optional) cambozola java streaming client installed (?)"

Path to (optional) ffmpeg mpeg encoder (?) enter /usr/bin/ffmpeg click Save

Reboot server to insure Zoneminder starts on boot.

Return to the Zoneminder web page to set up your cameras.