Sutff about my job and comments about personal activities. Take a look to the first idea.

Saturday, August 22, 2009

Zoneminder on debian

Just been amazed again by the power of debian...

There is a livecd with archlinux and zoneminder latest version... just for testing and every other package broken as it's suppouse to be... but debian has zoneminder package with everything on the road... just a few tips

Setup permisions
$ chmod o+rx /dev/video*

Configure rsyslog
vi /etc/rsyslog.conf
< *.*;auth,authpriv.none -/var/log/syslog > *.*;local1.none;auth,authpriv.none -/var/log/syslog
> local1.* /var/log/zm/zm.log
> local1.!*;local1.warning -/var/log/messages

Configure logrotate
vi /etc/logrotate.d/1st-zoneminder
>/var/log/zm/*log {
> weekly
> rotate 3
> notifempty
> missingok
> postrotate
> /usr/bin/zmpkg.pl logrot
> endscript
>}

The files are store in /var/cache/zoneminder with thousands of files, so I suggest to use an smaller inode_radio from 16384 to 8192 and set only 1% reserved block count
mkfs.ext3 -i 8192 -m 1 /dev/sdaX

Add noatime to fstab
vi /etc/fstab
> /dev/sdaX /var/cache/zoneminder ext3 defaults,noatime,nodiratime 0 0