Setting up zoneminder on Ubuntu 12.04: Difference between revisions
Created page with "Zoneminder 1.25.0 on Ubuntu 12.04 64-bit This installation uses Zoneminder from the Ubuntu sources. Zoneminder in Ubuntu since the 11.10 version is compiled with the mmap opt..." |
No edit summary |
||
Line 140: | Line 140: | ||
Return to the Zoneminder web page to set up your cameras. | Return to the Zoneminder web page to set up your cameras. | ||
-- Fixing Corrupt Jpeg errors -- | |||
http://lachlanmiskin.com/blog/2012/06/25/zoneminder-foscam-fi8918w-war-corrupt-jpeg-data-extraneous-bytes-before-marker-0xd9/ | |||
Thanks for the steps, it helped updating the source package. For ubuntu I followed these steps as outlined on (http://www.moosechips.com/2008/09/ubuntu-rebuild-a-source-package/): | |||
cd /usr/src | |||
mkdir modjpeg; | |||
cd modjpeg | |||
sudo bash | |||
apt-get install build-essential fakeroot dpkg-dev devscripts | |||
apt-get source libjpeg-turbo | |||
cd libjpeg-turbo-1.1.90+svn733/ | |||
vi jdmarker.c | |||
# Comment out the warning as outlined above # | |||
cd .. | |||
apt-get build-dep libjpeg-turbo | |||
cd libjpeg-turbo-1.1.90+svn733/ | |||
dch -i | |||
# added my revision number and changes # | |||
dpkg-buildpackage -rfakeroot -uc -b | |||
cd .. | |||
# Install the new libjpeg and dependencies | |||
dpkg -i ./*.deb | |||
tail -f /var/log/syslog & | |||
service zoneminder restart |
Latest revision as of 08:54, 24 January 2013
Zoneminder 1.25.0 on Ubuntu 12.04 64-bit
This installation uses Zoneminder from the Ubuntu sources. Zoneminder in Ubuntu since the 11.10 version is compiled with the mmap option. I am running an Optiplex 755 with a dual core processor, 2 GIG RAM and 160 GIG hard drive. I have 10 Linksys IP cameras with Modect operational. I have run this install and have set up the 10 cameras in about an hour!
Note: While not tested this should work for 32 BIT as well
Install Ubuntu
There are plenty of sources for instructions on how to install Ubuntu.
Install Basic Server (if you used the mini.iso), OpenSSH Server, and LAMP Server.
Reboot server.
Log in then become root:
sudo su
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 68.87.75.194
Note: for Ubuntu 12.04 the resolv.conf is dynamically assigned. The "dns-servers" entry in the interfaces file will set the DNS Multiple DNS server entries can be used.
Ctrl+o Enter to save
CTRL+x to exit
Reboot server
From this point on I used Putty from another PC to configure the server.
Install Zoneminder
Log in then become root
sudo su
apt-get install zoneminder
Note: You will be prompted to configure Nullmailer during the Zoneminder install. You can leave the program un-configured if you do not plan to have the server email alerts. Or search for instructions to configure Nullmailer.
Add delay to allow MySQL to start before Zoneminder
nano /etc/init.d/zoneminder
Add above "zmfix -a" sleep 15
Ctrl+o Enter to save
CTRL+x to exit
Link Apache to Zoneminder
ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
/etc/init.d/apache2 force-reload
adduser www-data video
Optional Install Cambozola
cd /usr/src && wget http://www.charliemouse.com:8080/code/cambozola/cambozola-latest.tar.gz
tar -xzvf cambozola-latest.tar.gz
replace "92" with cambozola version downloaded
cp cambozola-0.92/dist/cambozola.jar /usr/share/zoneminder
Optional Add SSL to Apache2
Create a self-signed certificate:
make-ssl-cert generate-default-snakeoil --force-overwrite
Activate Apache SSL module:
a2enmod ssl
Activate Apache default ssl virtual host:
a2ensite default-ssl
Restart Apache:
service apache2 restart
You should now be able to access the web server using https://serverip
NTP Daily Sync
nano /etc/cron.daily/ntpdate
Copy the following two lines into nano
#!/bin/sh ntpdate ntp.ubuntu.com
Note: replace ntp.ubuntu.com with the time server(s) of your choice. I use time-a.nist.gov time-b.nist.gov
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
Optional: check "Is the (optional) cambozola java streaming client installed (?)"
Path to (optional) ffmpeg mpeg encoder (?) enter /usr/bin/ffmpeg click Save
Reboot server to insure Zoneminder starts on boot.
Return to the Zoneminder web page to set up your cameras.
-- Fixing Corrupt Jpeg errors --
Thanks for the steps, it helped updating the source package. For ubuntu I followed these steps as outlined on (http://www.moosechips.com/2008/09/ubuntu-rebuild-a-source-package/):
cd /usr/src mkdir modjpeg; cd modjpeg sudo bash
apt-get install build-essential fakeroot dpkg-dev devscripts
apt-get source libjpeg-turbo cd libjpeg-turbo-1.1.90+svn733/ vi jdmarker.c
- Comment out the warning as outlined above #
cd .. apt-get build-dep libjpeg-turbo cd libjpeg-turbo-1.1.90+svn733/ dch -i
- added my revision number and changes #
dpkg-buildpackage -rfakeroot -uc -b cd ..
- Install the new libjpeg and dependencies
dpkg -i ./*.deb tail -f /var/log/syslog & service zoneminder restart