How to install Zoneminder 1.29.0 on Ubuntu 16.04

Open the Ubuntu terminal

sudo su

apt-get update
apt-get upgrade
apt-get dist-upgrade

rm /etc/mysql/my.cnf  

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

add the following line at 32


Screenshot from 2016-04-23 21-38-28

Then save my.cnf

systemctl restart mysql

Install Zoneminder

Install Synaptic package manager using Ubuntu Software Center

Then install Zoneminder 29.1.0 using the Synaptic package manager

(Ubuntu Software Center in Ubuntu 16.04 does not have Zoneminder)

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

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


chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf
adduser www-data video
a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
chown -R www-data:www-data /usr/share/zoneminder/
systemctl enable zoneminder

service zoneminder start

Add timezone to PHP

gedit /etc/php/7.0/apache2/php.ini
edit line 912 with your timezone

Screenshot from 2016-04-23 21-40-45
Then save the file php.ini

Your time zone can be get from here 

service apache2 reload

Open Zoneminder http://localhost/zm/
Note:- If you do not get the streaming ,Plese goto ZM-Options in 
ZM-Console and check the Paths for PATH_ZMS. It should be changed 
to /zm/cgi-bin/nph-zms.
Referance Zoneminder Wiki