Difference between revisions of "Ubuntu Server 18.04 64-bit with Zoneminder 1.32.x the easy way"

From ZoneMinder Wiki
Jump to navigationJump to search
m
Line 1: Line 1:
This "Easy" install will use the Snapshot version of Zoneminder from the PPA "master." Be advised
As of 03JUL15 there is a package in the PPA for Vivid Zoneminder. This how to has been edited to reflect the change.
 
that sometimes there are bugs in the snapshot version. My experience is that everything important
 
in Zoneminder does work.


If you install Ubuntu from server CD, install OpenSSH Server, and LAMP Server (LAMP installs  
If you install Ubuntu from server CD, install OpenSSH Server, and LAMP Server (LAMP installs  
Line 50: Line 46:
  apt-get install python-software-properties
  apt-get install python-software-properties
   
   
  add-apt-repository ppa:iconnor/zoneminder-master
  add-apt-repository ppa:iconnor/zoneminder
   
   
  apt-get update
  apt-get update
Line 62: Line 58:
  apt-get install libvlc-dev libvlccore-dev vlc
  apt-get install libvlc-dev libvlccore-dev vlc


Note: as of the latest Snapshot builds the zoneminder.service file is included. Am leaving this section in place for reference.
-------------------------------------------------------------------------------------------------------------------------------
Create a file called zoneminder.service
  nano /lib/systemd/system/zoneminder.service
Paste or enter the following:
  # ZoneMinder systemd unit file
  # This file is intended to work with all Linux distributions
  [Unit]
  Description=ZoneMinder CCTV recording and security system
  After=network.target mysql.service apache2.service
  Requires=mysql.service apache2.service
  [Service]
  User=www-data
  Type=forking
  ExecStart=/usr/bin/zmpkg.pl start
  ExecReload=/usr/bin/zmpkg.pl restart
  ExecStop=/usr/bin/zmpkg.pl stop
  PIDFile="/run/zm/zm.pid"
  [Install]
  WantedBy=multi-user.target
Ctrl+o Enter to save
CTRL+x to exit
---------------------------------------------------------------------------------------------------------------------------------
Create a file called zoneminder.conf
Create a file called zoneminder.conf


Line 142: Line 111:
  tar -xzvf cambozola-latest.tar.gz
  tar -xzvf cambozola-latest.tar.gz


replace 936 with cambozola version downloaded
replace 936 in the following with cambozola version downloaded


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

Revision as of 15:31, 9 July 2015

As of 03JUL15 there is a package in the PPA for Vivid Zoneminder. This how to has been edited to reflect the change.

If you install Ubuntu from server CD, install OpenSSH Server, and LAMP Server (LAMP installs

Apache2, PHP, and MySQL server)

If you use the minimum Ubuntu ISO CD, install Basic Server, OpenSSH Server, and LAMP Server (LAMP

installs Apache2, PHP, and MySQL server)

Log in then become root:

sudo su

If you used the server install CD

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


Reboot server

CGI is not enabled in Ubuntu 15.04 by default. Enable it this way:

a2enmod cgi

Restart Apache

service apache2 restart

Add Repository

apt-get install python-software-properties

add-apt-repository ppa:iconnor/zoneminder

apt-get update

Install Zoneminder

apt-get install zoneminder

You may need to install "extra" VLC components (I will check this and edit as needed)

apt-get install libvlc-dev libvlccore-dev vlc

Create a file called zoneminder.conf

nano /etc/tmpfiles.d/zoneminder.conf

Paste or enter the following

d /var/run/zm 0755 www-data www-data

CTRL+o to save the file CTRL+x to exit nano

Change permissions on the file

chmod 755 /etc/tmpfiles.d/zoneminder.conf

Enable Zoneminder

systemctl enable zoneminder.service

Start Zoneminder

systemctl start zoneminder.service

Check to see that Zoneminder is running

systemctl status zoneminder.service

Create a directory in apache2

mkdir /etc/apache2/conf.d

Create two symbolic links

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


Create a new user

adduser www-data video

Restart Apache

service apache2 restart

Install Cambozola (needed if you use Internet Explorer)


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

replace 936 in the following with cambozola version downloaded

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

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

Optional 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