Difference between revisions of "Ubuntu Server 19.10 Zoneminder 1.33.x"

From ZoneMinder Wiki
Jump to navigationJump to search
Line 8: Line 8:
These instructions will show how to install Zoneminder 1.32-3 from the iconnor ppa with mp4 support to use video recordings.
These instructions will show how to install Zoneminder 1.32-3 from the iconnor ppa with mp4 support to use video recordings.


[[[ CURRENTLY EDITING IN PROGRESS ]]]
'''[[[ CURRENTLY EDITING IN PROGRESS ]]]'''


You will need to install LAMP then secure MySQL before installing Zoneminder.
Install needed packages:
sudo apt-get install x264 x265 build-essential check-install gedebi


You will need to install LAMP then secure MySQL before installing Zoneminder.


Here are the basic commands you will need. As always start from a root (sudo su) prompt.


Secure MySQL or Mariadb
Secure MySQL or Mariadb:


  mysql_secure_installation
  mysql_secure_installation


Add entry into my.cnf
 
Add entry into my.cnf:


  nano /etc/mysql/my.cnf
  nano /etc/mysql/my.cnf


Add the following to the end of the file
 
Add the following to the end of the file:


  [mysqld]
  [mysqld]
Line 29: Line 35:


CTRL + o
CTRL + o
CTRL +x
CTRL + x
 
Restart MySQL:
 
service mysql restart
 
 
 
Install the official repository for the current stable version 1.32:
 
sudo add-apt-repository ppa:iconnor/zoneminder-1.32
 
Now installing zoneminder by "sudo apt-get install zoneminder" will not work because of missing dependencies (as of 05/01/2019)
 
 


Restart MySQL
Download, compile libmp4v2-2:
 
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mp4v2/mp4v2-2.0.0.tar.bz2
tar xf mp4v2-2.0.0.tar.bz2
cd mp4v2-2.0.0/
mkdir build/ && cd build/
../configure CXXFLAGS='-fpermissive' CFLAGS='-fpermissive'
make
Don't leave this folder.
 
Install libmp4v2-2 as debian package:
 
sudo checkinstall


systemctl restart mysql


Install Zoneminder
Install Zoneminder


  apt install zoneminder
  apt install zoneminder


The database is not created automatically. Create the database with
The database is not created automatically. Create the database with

Revision as of 11:03, 2 May 2019

<Home

Zoneminder 1.32 made it into the "official" Ubuntu 19.04 repositories. Unfortunately the MP4 recording and playback does not work with the shipped version as there are missing libraries (libmp4v2-2). So events can only be saved in jpeg-frames, video recordings do not happen. [State: 01 MAY 2019]

These instructions will show how to install Zoneminder 1.32-3 from the iconnor ppa with mp4 support to use video recordings.

[[[ CURRENTLY EDITING IN PROGRESS ]]]

You will need to install LAMP then secure MySQL before installing Zoneminder.


Install needed packages:

sudo apt-get install x264 x265 build-essential check-install gedebi


Secure MySQL or Mariadb:

mysql_secure_installation


Add entry into my.cnf:

nano /etc/mysql/my.cnf


Add the following to the end of the file:

[mysqld]
sql_mode = NO_ENGINE_SUBSTITUTION

CTRL + o CTRL + x

Restart MySQL:

service mysql restart


Install the official repository for the current stable version 1.32:

sudo add-apt-repository ppa:iconnor/zoneminder-1.32

Now installing zoneminder by "sudo apt-get install zoneminder" will not work because of missing dependencies (as of 05/01/2019)


Download, compile libmp4v2-2:

wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mp4v2/mp4v2-2.0.0.tar.bz2

tar xf mp4v2-2.0.0.tar.bz2
cd mp4v2-2.0.0/
mkdir build/ && cd build/
../configure CXXFLAGS='-fpermissive' CFLAGS='-fpermissive'
make

Don't leave this folder.

Install libmp4v2-2 as debian package:

sudo checkinstall


Install Zoneminder

apt install zoneminder


The database is not created automatically. Create the database with

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
mysqladmin -uroot -p reload

Fix permissions

chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
chown -R www-data:www-data /usr/share/zoneminder/

Enable Zoneminder service

systemctl enable zoneminder.service

Add a user for local cameras

adduser www-data video

Enable Apache Features

a2enmod cgi
a2enmod rewrite
a2enconf zoneminder

Add timezone to PHP

nano /etc/php/7.2/apache2/php.ini

Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone

[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

Zoneminder should work! Open Zoneminder in a web browser (http://server-ip/zm).