Ubuntu 11.04 Server amd64 - 1.24.3 Source Install Guide

Forum for questions and support relating to the 1.24.x releases only.
Locked
MILxDOT
Posts: 64
Joined: Wed Mar 29, 2006 5:12 am

Ubuntu 11.04 Server amd64 - 1.24.3 Source Install Guide

Post by MILxDOT »

Code: Select all

INSTALL SERVER OS
Perform a fresh install Ubuntu Server 11.04 amd64 DO NOT install any packages during the initial install other than openssh-server.

GO SUDO AND STAY THERE FOR ENTIRE INSTALLATION
sudo -i

UPDATE SERVER OS
apt-get update; apt-get dist-upgrade

REBOOT
/sbin/shutdown now -r

SET A STATIC IP (optional)
nano /etc/network/interfaces

INSTALL ALL ZONEMINDER PREREQUISITES
apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxvidcore-dev zlib1g-dev build-essential linux-headers-`uname -r` automake perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apache2 php5-mysql libapache2-mod-php5 mysql-server libmysqlclient16-dev libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libjpeg62 libjpeg62-dev libmime-perl libstdc++6 libwww-perl zlib1g zip unzip patch ntp openssl libpcre3-dev libssl-dev libjpeg-progs libcurl4-gnutls-dev munin munin-node libmime-lite-perl netpbm libbz2-dev sysvinit-utils ffmpeg x264 libx264-dev curl lynx coreutils bc


INSTALL PERL MODULES
perl -MCPAN -e shell

install CPAN
install YAML PHP::Serialization Module::Load X10::ActiveHome
install Sys::Mmap

exit

INSTALL AND CONFIGURE ZONEMINDER
cd /usr/src
svn co http://svn.zoneminder.com/svn/zm/trunk zm
cd zm

./configure --with-webdir=/var/www --with-cgidir=/usr/lib/cgi-bin ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --enable-debug=yes --with-webgroup=www-data --with-webuser=www-data

make
make install

mysql < db/zm_create.sql
mysql

grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
flush privileges;
quit

INSTALL CAMBOZOLA
cd /usr/src
wget http://www.charliemouse.com:8080/code/cambozola/cambozola-latest.tar.gz
tar -xzvf cambozola-latest.tar.gz
cp cambozola-0.92/dist/cambozola.jar /var/www

INSTALL JSCALENDAR
cd /usr/src
wget -O jscalendar-1.0.zip "http://sourceforge.net/projects/jscalendar/files/jscalendar/1.0/jscalendar-1.0.zip/download"
unzip jscalendar-1.0.zip
mkdir /var/www/tools/jscalendar
cp -R jscalendar-1.0/* /var/www/tools/jscalendar

REMOVE EXISTING index.html
rm /var/www/index.html

SET SHARED MEMORY SETTINGS
echo "kernel.shmall = 268435456" >> /etc/sysctl.conf
echo "kernel.shmmax = 268435456" >> /etc/sysctl.conf

CREATE STARTUP SCRIPT
Use nano or vi to create/edit /etc/init.d/zm 

nano /etc/init.d/zm  (then paste the following)

#!/bin/sh
# description: Control ZoneMinder as a Service
# chkconfig: 2345 99 99

# Source function library.
#. /etc/rc.d/init.d/functions

prog=ZoneMinder
ZM_PATH_BIN="/usr/local/bin"
command="$ZM_PATH_BIN/zmpkg.pl"

start() {
echo -n "Starting $prog: "
    if ! [ -d /tmp/zm ]; then
        mkdir /tmp/zm
        chown -R www-data:www-data /tmp/zm
    fi
$command start
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
return $RETVAL
}
stop() {
echo -n "Stopping $prog: "
$command stop
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
}
status() {
result=`$command status`
if [ "$result" = "running" ]; then
echo "ZoneMinder is running"
RETVAL=0
else
echo "ZoneMinder is stopped"
RETVAL=1
fi
}

case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
'status')
status
;;
*)
echo "Usage: $0 { start | stop | restart | status }"
RETVAL=1
;;
esac
exit $RETVAL

(then save and exit)

SETUP ZM TO STARTUP AUTOMATICALLY AFTER A REBOOT
nano /etc/rc.local
(paste the following above the exit 0 line):
sleep 20 && /etc/init.d/zm start

(then save and exit)

SET PERMISSIONS ON STARTUP SCRIPT
chmod 755 /etc/init.d/zm

REBOOT THE SERVER
/sbin/shutdown now -r 

LOGIN TO ZONEMINDER
Open a web browser and visit http://ipaddressofyourserver

MAKE SURE YOU SET YOUR purgewhenfull filter!
MILxDOT
Posts: 64
Joined: Wed Mar 29, 2006 5:12 am

Post by MILxDOT »

I have tested this build with the new eyezm app on my iphone 4 iOS 4.3.

Works very good!

My thanks to the eyezm developer for a great app!
estranged1977
Posts: 15
Joined: Wed Feb 17, 2010 1:57 am

Re: Ubuntu 11.04 Server amd64 - 1.24.3 Source Install Guide

Post by estranged1977 »

Hi, I installed all the system, it works but Im having troubles with record mode, I have 6 network cams, Dlink-DCS-910 and when I set them to just record the timeline is with blank spaces, it is not recording the entire day, it has a lot of blank spaces, any Idea?
jomimube
Posts: 6
Joined: Tue Jul 21, 2009 2:54 am
Location: Bogota

Re: Ubuntu 11.04 Server amd64 - 1.24.3 Source Install Guide

Post by jomimube »

Thanks for passing their knowledge.

Fresh install Ubuntu 10.10 on Dell Dimension 3000 Server 32-Bit.
last lines with error
checking for perl module Getopt:: Long ... ok
checking for perl module Time:: HiRes ... ok
checking for perl module Date:: Manip ... ok
checking for perl module LWP:: UserAgent ... ok
checking for perl module PHP:: Serialization ... no
configure: error: zm Requires PHP:: Serialization

CPAN in error is:
cpan [1]> install YAML PHP:: Serialization Module:: Load X10:: ActiveHome
CPAN: Storable loaded ok (v2.20)
Going to read '/ root / .cpan / Metadata'
Warning: Can not install PHP:: Serialization, Do not Know What It Is.
Try the command

i / PHP:: Serialization /

to find objects with matching identifiers.
CPAN: Time:: HiRes loaded ok (v1.9719)
Warning: Can not install Module:: Load, Do not Know What It Is.
Try the command

i / Module:: Load /

to find objects with matching identifiers.
Warning: Can not install X10:: ActiveHome, Do not Know What It Is.
Try the command

i / X10:: ActiveHome /

to find objects with matching identifiers.
Running install for module 'YAML'

The YAML module isn't available on CPAN.

Either the module Has Not Been yet uploaded to CPAN, or it is
temporary unavailable. Please contact the author to find out
more about the status. Try 'i YAML'.

Thanks
La próxima generación en este planeta, sera Linux.
martymoose
Posts: 128
Joined: Tue Jul 12, 2005 9:59 am
Location: australia

Re: Ubuntu 11.04 Server amd64 - 1.24.3 Source Install Guide

Post by martymoose »

did you get the 32bit version working
I donated have YOU?
Locked