Difference between revisions of "Ubuntu Server 17.10 64-bit with Zoneminder 1.30.4 the easy way"

From ZoneMinder Wiki
Jump to navigationJump to search
Line 1: Line 1:
If you are not experienced with Linux and would like a quick way to get Zoneminder running for you, consider Zoneminder on a stick, a per-configured Lubuntu 14.04 with Zoneminder 1.29.0. See: https://wiki.zoneminder.com/Lubuntu_14.04_with_Zoneminder_1.29.0_pre-configured_CD_or_USB
This is an interim procedure to install Zoneminder 1.30.4 on Ubuntu 17.10


04OCT15
There are some issues with the Zoneminder package provided with Ubuntu 17.10. This is an alternate install procedure that uses the install package from the iconnor PPA for Zesty (Ubuntu 17.04)
This procedure has been updated because we've learned a few things. We used to tell you to use the 14.04 - 1.26.5 instructions.


This assumes you have installed Ubuntu 17.10 with LAMP.


If you use the minimum Ubuntu ISO CD, install Basic Server, OpenSSH Server, and LAMP Server (LAMP installs Apache2, PHP, and MySQL server)
You will need to make a settings change to MySQL as follows:


This removes the current symbolic link


There is a newer version of Zoneminder in the iconnor/zoneminder PPA.  
rm /etc/mysql/my.cnf 


Log in then become root:
This moves the MYSQL Configuration file


  sudo su
  cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf


If you used the server install CD
To change MySQL settings:
apt-get update
apt-get upgrade
apt-get dist-upgrade


Optional: Set static IP address
nano /etc/mysql/my.cnf


nano /etc/network/interfaces
In the [mysqld] section add the following


Make changes similar to this:
sql_mode = NO_ENGINE_SUBSTITUTION


auto eth0
Ctrl+o Enter to save
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


CTRL+x to exit


Reboot server
Restart MySQL
 
CGI is not enabled in Ubuntu 15.04 by default. Enable it this way:
 
a2enmod cgi
 
Restart Apache
 
service apache2 restart
 
Install Zoneminder
 
apt-get install zoneminder
 
 
Enable Zoneminder
 
systemctl enable zoneminder.service
 
Start Zoneminder
 
systemctl start zoneminder.service


Check to see that Zoneminder is running
systemctl restart mysql


systemctl status zoneminder.service
Download the Zoneminder install package from the iconnor PPA. Note this is for the 64 bit version.  


wget https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder/+build/12557069/+files/zoneminder_1.30.4-zesty1_amd64.deb


Create a symbolic link
Install Zoneminder - Note: Change (user) to the user in the home directory on your system
 
ln -s /etc/zm/apache.conf /etc/apache2/conf-enabled/zoneminder.conf


apt install vlc-plugin-base /home/(user)/zoneminder_1.30.4-zesty1_amd64.deb


Create a new user
Create a new user
Line 70: Line 43:
  adduser www-data video
  adduser www-data video


Restart Apache
Enable CGI, Zoneminder and rewrite configuration in Apache.


  service apache2 restart
  a2enmod cgi


Install Cambozola (needed if you use Internet Explorer)
a2enconf zoneminder


a2enmod rewrite


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


  tar -xzvf cambozola-latest.tar.gz
  chown -R www-data:www-data /usr/share/zoneminder/


replace 936 in the following with cambozola version downloaded
Enable and start Zoneminder


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


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


Optional NTP Daily Sync
Add timezone to PHP


  nano /etc/cron.daily/ntpdate
  nano /etc/php/7.1/apache2/php.ini


Copy the following into nano
Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone. Make sure to remove the ; from the front of date.timezone


  !/bin/sh ntpdate ntp.ubuntu.com
  [Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York


Ctrl+o Enter to save
Ctrl+o Enter to save
Line 99: Line 76:
CTRL+x to exit
CTRL+x to exit


chmod 755 /etc/cron.daily/ntpdate
Restart Apache
 
Open Zoneminder in web browser
 
http://serverip/zm
 
Click Options


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


Click Images tab


check Is the (optional) cambozola java streaming client installed (?) Click Save
IMPORTANT FINAL STEP: Open Zoneminder in a web browser (http://server-ip/zm). Click on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms

Revision as of 13:51, 27 October 2017

This is an interim procedure to install Zoneminder 1.30.4 on Ubuntu 17.10

There are some issues with the Zoneminder package provided with Ubuntu 17.10. This is an alternate install procedure that uses the install package from the iconnor PPA for Zesty (Ubuntu 17.04)

This assumes you have installed Ubuntu 17.10 with LAMP.

You will need to make a settings change to MySQL as follows:

This removes the current symbolic link

rm /etc/mysql/my.cnf  

This moves the MYSQL Configuration file

cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf

To change MySQL settings:

nano /etc/mysql/my.cnf

In the [mysqld] section add the following

sql_mode = NO_ENGINE_SUBSTITUTION

Ctrl+o Enter to save

CTRL+x to exit

Restart MySQL

systemctl restart mysql

Download the Zoneminder install package from the iconnor PPA. Note this is for the 64 bit version.

wget https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder/+build/12557069/+files/zoneminder_1.30.4-zesty1_amd64.deb

Install Zoneminder - Note: Change (user) to the user in the home directory on your system

apt install vlc-plugin-base /home/(user)/zoneminder_1.30.4-zesty1_amd64.deb

Create a new user

adduser www-data video

Enable CGI, Zoneminder and rewrite configuration in Apache.

a2enmod cgi
a2enconf zoneminder
a2enmod rewrite

Fix Permissions

chown -R www-data:www-data /usr/share/zoneminder/

Enable and start Zoneminder

systemctl enable zoneminder
service zoneminder start

Add timezone to PHP

nano /etc/php/7.1/apache2/php.ini

Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone. Make sure to remove the ; from the front of date.timezone

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York

Ctrl+o Enter to save

CTRL+x to exit

Restart Apache

service apache2 reload


IMPORTANT FINAL STEP: Open Zoneminder in a web browser (http://server-ip/zm). Click on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms