ZoneMinder installation (webcam web-frontend)
 
This article describes my installation of ZoneMinder (http://www.zoneminder.com/) on SUSE Linux 9.3.
I installed ZoneMinder on SUSE Linux 10.1 later, with the manual from the Wiki on Zoneminder.com:
http://www.zoneminder.com/wiki/index.php/SuSE_10.1_and_ZoneMinder

WebCam / Driver installation

First, I had to install the driver for my Vimicro WebCam:
Vimicro Driver Page: http://mxhaard.free.fr/spca5xx.html
--> gspcav1-20061216.tar.gz
./gspca_build
make install

To check your webcam, you can use the "webcam" linux command-line utility ("man webcam"). In the "~./home/.webcamrc" file, you need to specify the input parameter. To see a list of possible values, execute v4lctl list (part of video4linux package. My vimicro webcam was "ZC301-2".

ZoneMinder installation

As a requirement from ZoneMinder, I had to installl some software. I got the fist load on Packman (http://packman.links2linux.de/):
libffmpeg0-0.4.9-8.pm.svn20070208.i586.rpm
libffmpeg0-devel-0.4.9-8.pm.svn20070208.i586.rpm
libtheora-1.0alpha7-0.pm.0.i586.rpm
xvid-1.1.2-0.pm.1.i586.rpm
lame-3.97-1.i586.rpm
libmp4v2-1.5.0.1-4.i586.rpm
faad2-2.5-0.pm.4.i586.rpm
faac-1.25-0.pm.3.i586.rpm
x264-0.0svn20061031-1.i586.rpm
libdts-0.0.2-0.pm.1.i586.rpm

After this, I installed some more using Yast (part of the original cds):
libogg-1.1.2-3.i586.rpm
libogg-devel-1.1.2-3.i586.rpm
perl-DBI-1.47-3.i586.rpm
libvorbis-1.1.0-4.i586.rpm
libvorbis-devel-1.1.0-4.i586.rpm
audiofile-0.2.6-3.i586.rpm
esound-0.2.35-8.i586.rpm
slang-1.4.9-126.i586.rpm
aalib-1.4.0-285.i586.rpm
SDL-1.2.8-4.i586.rpm
perl-Data-ShowTable-3.3-572.i586.rpm
perl-HTML-Parser-3.45-3.i586.rpm
perl-HTML-Tagset-3.04-3.i586.rpm
perl-libwww-perl-5.803-3.i586.rpm
perl-URI-1.35-3.i586.rpm
perl-Archive-Tar-1.08-31.i586.rpm
perl-Archive-Zip-1.09-30.i586.rpm
perl-IO-stringy-2.109-30.i586.rpm
perl-MailTools-1.60-32.i586.rpm
perl-MIME-tools-5.415-4.i586.rpm
v4l-tools


Finally, another perl module was required:
http://www.cpan.org/modules/01modules.index.html
Download DBD-mysql-4.004.tar.gz
Download LWP-UserAgent-iTMS_Client-0.16.tar.gz
Install:
perl Makefile.PL
make
make test
make install


Create an executable file "cfgscript" with the following content:
make clean

./configure \
--with-webdir=/home/srv/html-zoneminder1233 \
--with-cgidir=/home/srv/html-zoneminder1233/cgi-bin \
--with-webgroup=APACHE_USER_HERE \
--with-webuser=APACHE_GROUP_HERE \
ZM_DB_HOST=localhost \
ZM_DB_NAME=ZM_DB_HERE \
ZM_DB_USER=ZM_DB_USER_HERE \
ZM_DB_PASS=YOUR_PW_HERE


Now, ZoneMinder can be installed:
./cfgscript
make
make install


Database file has to be imported: db/zm_create.sql (rename db)
DB-Data has to be in this file: /usr/local/etc/zm.conf

Further, php.ini needs a modification in order to make ZM work:
short_open_tag = On

In httpd.conf, I had to comment a line out so I was able to use this feature for just ZM and not all Apache vhosts:
# ScriptAlias /cgi-bin/ /path/to/cgi-bin/

ZoneMinder logging (change log file)

By default, zoneminder logs to /var/log/messages, which is a little bit annoying beause it floods the file with messages.
If you have syslog-ng, you can change the default log file for zm messages. Simply add the following to /etc/syslog-ng/syslog-ng.conf:
filter f_zm { match("^zm.*"); };
destination zm { file("/var/log/zoneminder.log"); };
log { source(src); filter(f_zm); destination(zm); };

Then, change this line in the same file:
filter f_messages  { not facility(news, mail) and not filter(f_iptables); };
To the following:
filter f_messages  { not facility(news, mail) and not filter(f_iptables) and not filter(f_zm); };
After this, restart syslog-ng: /etc/init.d/syslog restart and zm should log to /var/log/zoneminder.log now.

ZoneMinder debug

I had Shared memory problems in ZoneMinder, even tough I used a Suse standard configured linux, with standard kernel configuration. If you got "shared memory not valid" in your logfile, you've got them too:
cat /tmp/zmwatch.log | grep 'shared memory not valid'
To check your shared memory, do the following:
cat /proc/sys/kernel/shmall
cat /proc/sys/kernel/shmmax

My shmall was set to 2 MB, shmmax was set to 32MB
To set it to a higher value (128MB) temporarily:
echo 134217728 >/proc/sys/kernel/shmall
echo 134217728 >/proc/sys/kernel/shmmax

To set this permanently, modify the parameters "kernel.shmall" and "kernel.shmmax" in /etc/sysctl.conf.
If these parameters don't exist in sysctl.conf, create them.

http://www.zoneminder.com/fileadmin/downloads/README.html
 
admin / Dec 07, 2006
   
 
 
Login: 
Pass: 
 
 
     
     
2004 - 2017 / lookass.ch
makememad@lookass.ch