zoneminder 1.29 (free NVR for Linux) on Ubuntu 16.04 LTS

Intro:
Having a couple of spare PC parts laying around i put together a linux box, why do i have to pay for windows license ?
Looking over the INTERNET for a Linux based NVR (CCTV Recorder) software, zoneminder came up almost every time.

These steps will get you to install zoneminder 1.29 on Ubuntu 16.04 LTS 64bit as of the post date (May 2016), because fuck knows what other issues will associate other releases (of zoneminder, apache2 or mysql). Nothing much of my effort here, mostly googling around the issues i was facing, this is a list of things to do in order to get it to work.

Official steps of setting up reference here:

(this will install zoneminder, apache2 and mysql (at least it did for me) you will be prompt for mysql root password)

sudo apt-get update
sudo apt-get install zoneminder

 

Some Database stuff:

sudo mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql

mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"

Some other stuff:

sudo /usr/bin/zmupdate.pl

sudo systemctl enable zoneminder

sudo a2enconf zoneminder

sudo a2enmod cgi

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

sudo a2enmod rewrite

sudo chown www-data:www-data /etc/zm/zm.conf

sudo nano /etc/php/7.0/apache2/php.ini

look for “date.timezone” uncomment and set it to a proper value in my case it was Asia/Amman

sudo service apache2 reload
sudo systemctl restart zoneminder

now you should be able to get to the zoneminder web interface through http://localhost/zm

http://localhost/zm/api/ should show all green

running http://localhost/zm/api/host/getVersion.json should get you the version of zoneminder, if it didn’t do the following

sudo nano /etc/apache2/apache2.conf

Change “None” to “All” in two places reference here:

<Directory /usr/share>
 AllowOverride All
 Require all granted
</Directory>

<Directory /var/www/>
 Options Indexes FollowSymLinks
 AllowOverride All
 Require all granted
</Directory>

 

To fix the sql error while adding monitor:

sudo cp /usr/share/mysql/my-default.cnf /etc/mysql/my.cnf

sudo nano /etc/mysql/my.cnf

 

change

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

to

sql_mode=NO_ENGINE_SUBSTITUTION

 

sudo service mysql restart

sudo service zoneminder restart

one last step to avoid flooding the logs:

startup ZM console in your browser, go to Options->Path and make sure PATH_ZMS is set to /zm/cgi-bin/nph-zms and restart ZM (you should not need to do this for packages, as this should automatically work)

Adding Camera:

( RTSP Camera for example)

  • click “Add new monitor”
  • On General Tab:
    • Change Name to desired
    • Source type to FFEMPG
    • function to “Monitor” or “Record” what ever is desired
    • enabled ticked
  • On Source tab:
    • source path: rtsp://<username>:<password>@<ipaddress>/<stream path>
    • example path for dlink: rtsp://admin:admin@192.168.1.2/live1.sdp
    • remote method RTP/Unicast
    • change resolution to desired
    • click save

note: if you don’t want to have the zoneminder generated timestamp, change the mask on timestamp tab

Congratulations !

 

zoneminder

 

 

Posted on May 2, 2016, in Computers, Jordan, Uncategorized and tagged , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: