-
Enable Extras Repository (MySQL5 and PHP5)
-
echo "rpm [pcn] ftp://rhel-4:hiptop@rh.apt.clarkconnect.com System
extras" > /etc/apt/sources.list.d/extras.list
-
Update System
-
apt-get update
-
apt-get -y install cc-php cc-mysql cc-postfix cc-devel mysql-devel
libjpeg-devel perl-Time-HiRes perl-DateManip pcre-devel perl-Archive-Zip
perl-Archive-Tar perl-MIME-Types db4-devel
-
apt-get -y upgrade
-
apt-get -y dist-upgrade
-
Services
-
chkconfig mysqld on
-
chkconfig httpd on
-
chkconfig postfix on
-
service mysqld start
-
service httpd start
-
service postfix start
-
Install Perl Modules
-
cpan -i Device::SerialPort MIME::Lite
-
Install ffmpeg
-
cd /usr/src
-
wget http://ffmpeg.mplayerhq.hu/ffmpeg-checkout-snapshot.tar.bz2
-
tar xjf ffmpeg-checkout-snapshot.tar.bz2
-
cd `dir -d /usr/src/ffmpeg-checkout-2*`
-
./configure
-
make
-
make install
-
Install ZoneMinder
-
Extract
-
cd /usr/src
-
wget
http://public.planetmirror.com/pub/zoneminder/downloads/ZoneMinder-1.22.3.tar.gz
-
tar xzf ZoneMinder-1.22.3.tar.gz
-
Patch
-
cd /usr/src/ZoneMinder-1.22.3
-
wget http://www.zoneminder.com/downloads/zm-1.22.3-monpreset.patch
-
patch -p0 < zm-1.22.3-monpreset.patch
-
cd /usr/src/ZoneMinder-1.22.3/web
-
wget http://www.zoneminder.com/downloads/zm-1.22.3-filter.patch
-
patch -p0 < zm-1.22.3-filter.patch
-
Fix zm_mpeg.h
-
sed -i 's|#include <ffmpeg/avformat.h>|extern "C" {\n#define
__STDC_CONSTANT_MACROS\n#include<ffmpeg/avformat.h>\n}|'
/usr/src/ZoneMinder-1.22.3/src/zm_mpeg.h
-
Build
-
cd /usr/src/ZoneMinder-1.22.3
-
./configure --with-webdir=/var/www/html/zoneminder
--with-cgidir=/var/www/cgi-bin -with-ffmpeg=/usr/local/bin
-
make install
-
MySQL
-
mysql < /usr/src/ZoneMinder-1.22.3/db/zm_create.sql
-
mysql -vv -e "grant select,insert,update,delete on zm.* to zmuser@localhost
identified by 'zmpass'"
-
mysqladmin reload
-
Start script
-
cp -vf /usr/src/ZoneMinder-1.22.3/scripts/zm /etc/rc.d/init.d
-
chmod -v 755 /etc/rc.d/init.d/zm
-
chkconfig --add zm
-
chkconfig zm on
-
service zm start
|