Free video security camera using
ZoneMinder 1.24.2+ CentOS-5.5-i386-netinstall +Logitech orbit af webcam setup+ Audio recording
http://ftp.usf.edu/pub/centos/5.5/isos/i386/CentOS-5.5-i386-netinstall.iso
Website Name: mirror.centos.org
CentOS Directory: (for i386) /centos/5.5/os/i386
CentOS Directory: (for 64 bit) /centos/5.5/os/x86_64
select server and customize now options
Then click "Next" to continue on
Once presented with the custom package selection you need to un-check/check the following:
Applications = Check only "Editors" and "Text Based Internet" Development = Check only "Development Libraries" and "Development Tools" Servers = Un-check everything Base System = Check only "Base" (you can check Administration Tools and System Tools if you need them, but they are not necessary)
Now let the system finish installing
Reboot all commands should be run as root
After the first reboot the setup screen should appear. If not then log into the system and type "setup"
Go into the "Firewall Configuration" disable the Security Level, and Disable SELinux
Next we are going to disable a number of system services. Go back to the
setup screen and go into "System Services"
Un-Check or
chkconfig apmd off chkconfig bluetooth off chkconfig cups off chkconfig hidd off chkconfig ip6tables off chkconfig iptables off chkconfig netfs off chkconfig nfslock off chkconfig pcscd off chkconfig portmap off
First we need to download files and prepare the system
# For i386 CentOS 5.x run: rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm # For 64 bit CentOS 5.x run: rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
wget http://www2.zoneminder.com/downloads/ZoneMinder-1.24.2.tar.gz wget http://www.zoneminder.com/fileadmin/downloads/cambozola.jar
# tip: Copy/paste two lines at a time yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \ pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \ perl-Date-Manip perl-LWP-UserAgent-Determined yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \ perl-Module-Load subversion git yasm ffmpeg-devel ffmpeg alsa-utils
yum -y update
reboot -or- shutdown -r now
chkconfig httpd on chkconfig mysqld on chkconfig ntpd on service httpd start service mysqld start service ntpd start
cd /root/ # Or your work directory for this installation tar -zxvf ZoneMinder-1.24.2.tar.gz cd /root/ZoneMinder-1.24.2
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zm ZM_DB_PASS=zmpass ZM_SSL_LIB=openssl CPPFLAGS="-D__STDC_CONSTANT_MACROS"
make
make install
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.
Mysql setup for zoneminder
mysql
mysql> create database zm;
mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zm@localhost;
mysql> SET PASSWORD FOR zm@localhost=PASSWORD('zmpass');
mysql> exit
>Bye
mysql -u root zm < /root/ZoneMinder-1.24.2/db/zm_create.sql
cp /root/ZoneMinder-1.24.2/scripts/zm /etc/init.d/ chmod +x /etc/init.d/zm chkconfig zm on
cp /root/cambozola.jar /var/www/html/zm/
chown apache:apache /var/www/html/zm/cambozola.jar
service zm start
centos 5.5 have logitech orbit af webcamera driver.
plug in the webcamera and reboot
login again
ifconfig and note the ipaddress
logon to another pc and open http://ipaddress-from-aboveline/zm
create anew monitor and add device /dev/video with yuyv and 800X600 or 640x480 or 320x240 or 960x720 or 1600x1200 at 5 frame per sec
change options->images-> PATH_FFMPEG Path to (optional) ffmpeg mpeg encoder (?) /usr/bin/ffmpeg.
if you know how to get pan and tilt working let me know.
How to Record Audio when alarm occur
==============
===================
arecord -l to get the hardware id and channel
===================
card 1: U0x46d0x994 [USB Device 0x46d:0x994], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
===================
change recording volume to 80 percent
alsamixer -c 1
=========
hw:1,0 number "1" is taken from card 1: U0x46d0x994 [USB Device from arecord -l and number "0" is from device 0: USB Audio
To Test audio recording
arecord -f cd -D hw:1,0 -c 1 -d 60 -r 16000 test.wav
========
setup zoneminder to record audio.
========
cd /usr/local/bin
wget http://www.malayalam.net/howto/zoneminder/zmaudio
wget http://www.malayalam.net/howto/zoneminder/Monitor-1
chmod a+x /usr/local/bin/zmaudio
chmod a+x /usr/local/bin/Monitor-1
/bin/echo "/usr/local/bin/zmaudio &" >> /etc/rc.local
/bin/mkdir /var/www/html/sound
chown apache:apache /var/www/html/sound
reboot
to see and hear recorded audio files http://ipaddress/sound/ click on it to listen
done. have fun.