How To Build ZoneMinder 1.28.109 on an XAMPP stack

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

How To Build ZoneMinder 1.28.109 on an XAMPP stack

#1 Post by rockedge »

These are the general steps needed to build a working ZoneMinder 1.28.109
on top of an XAMPP 5.6.3-0 stack. All based on a Puppy Linux Tahr 6.0.3 CE operating system.
frugal install.


These files are needed and can be downloaded using the links provided

tahr-6.0.2_noPAE.iso

devx_tahr_6.0.2.sfs

XAMPP 5.6.3-0

libmysqlclient-dev_5.5.46-0ubuntu.12.04.2_i386.deb

libpolkit-gobject-1-dev_0.104-1ubuntu1.1_i386.deb

zoneminder

zmfix.sh


Start with a fresh install of Tahr 6.0.2 CE. Update to service pack 3
using quickpet or the PPM.

Using SFS-Load-on-the-fly install the devx_tahr_6.0.2.sfs

create save folder/file. ReBOOT

give XAMPP 5.6.3-0-run permissions to execute. Then add these 2 users:

Code: Select all

#adduser mysql

Code: Select all

#adduser group
install XAMPP 5.6.3-0 ( this step can be much more involved. the php.ini can be modified to the correct time zone
and other parameters. Also the XAMPP security system can be over-ridden by modifing
/opt/lampp/etc/extra/httpd-xampp.conf in the bottom most <Location>. ).

Add XAMPP security by changing the passwords with :

Code: Select all

#/opt/lampp/xampp security
install libmysqlclient-dev_5.5.46-0ubuntu.12.04.2_i386.deb and
libpolkit-gobject-1-dev_0.104-1ubuntu1.1_i386.deb

Needed now are the PERL modules needed for ZM compile.

open a terminal and type:

Code: Select all

#cpan App::cpanminus
answer YES to both prompts and allow install.

now to add the needed PERL mods:

Code: Select all

#cpanm DBD::mysql

Code: Select all

#cpanm Date::Manip

Code: Select all

#cpanm LWP::UserAgent

Code: Select all

#cpanm Sys::Mmap

Code: Select all

#cpanm Device::SerialPort
these are for the email functions:

Code: Select all

#cpanm MIME::Entity
for the newer email function:

Code: Select all

#cpanm MIME::Lite

Code: Select all

#cpanm Net::SMTP
Now to prepare to compile ZoneMinder. I used the ftpd directory for this part.

Code: Select all

#cd ~/ftpd

Code: Select all

#git clone https://github.com/ZoneMinder/zoneminder

Code: Select all

#cd zoneminder

Code: Select all

#git submodule init

Code: Select all

#git submodule update

I had to use this line while building ZoneMinder with tahr 6.0.5:

Code: Select all

#git submodule update --init --recursive
Start the compile of ZM:

Code: Select all

#cmake -DZM_WEBDIR=/opt/lampp/htdocs/zm -DZM_WEB_USER=daemon -DZM_WEB_GROUP=daemon -DZM_CGIDIR=/opt/lampp/cgi-bin ./

Code: Select all

#make

Code: Select all

#make install
IMPORTANT: using http://localhost/phpmyadmin
add mysql user "zmuser" with "zmpass" as the password.
create a database called "zm"
import ~/ftpd/zoneminder/db/zm_create.sql
close phpmyadmin

It is important now to decide where the events and images directories will be stored.
It is possible for example to store the data outside of the Puppy Linux frugal file system
and save event data to another partition. I use symlinks to a ext2 partition and an event & images directory.
In this how-to I use the default location.

For now open terminal and type:

Code: Select all

#mkdir /opt/lampp/htdocs/zm/events

Code: Select all

#mkdir /opt/lampp/htdocs/zm/images

Code: Select all

#mkdir /var/log/zm

Code: Select all

#mkdir /var/run/zm

Code: Select all

#chown -R daemon:daemon /opt/lampp/htdocs

Code: Select all

#chown -R daemon:daemon /var/log/zm
IMPORTANT: there must be a symlink for the /opt/lampp/run/mysql/mysql.sock in a directory
/var/run/mysqld/mysqld.sock for ZoneMinder to communicate with the MySQL server:

Code: Select all

#mkdir /var/run/mysqld

Code: Select all

#ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock
IMPORTANT: the symlink /opt/lampp/lib/libstdc++.so.6 ( target = /opt/lampp/lib/libstdc++.6.0.8 ) must be
deleted and replaced with a symlink /opt/lampp/lib/libstdc++.so.6 target=/usr/lib/libstdc++.so.6.0.19

Code: Select all

#rm /opt/lampp/lib/libstdc++.so.6

Code: Select all

#ln -s /usr/lib/libstdc++.so.6.0.19 /opt/lampp/lib/libstdc++.so.6
copy zoneminder and zmfix.sh script to ~/my-applications/bin

then in terminal:

Code: Select all

#/opt/lampp/xampp start

Code: Select all

#zoneminder start
Apache, MySQL and ZoneMinder should be started and running.

http://localhost/zm

IMPORTANT: To get the streams to run,
change in Options->Paths->PATH_ZMS from PATH_ZMS = /cgi-bin/nph-zms TO PATH_ZMS = /cgi-bin/zms

Check the ownership of the a local camera like /dev/video0, should be daemon if a local camera will not start.
Last edited by rockedge on Tue 22 Dec 2015, 15:04, edited 1 time in total.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#2 Post by rockedge »

I have used the above instructions to successfully build a working ZoneMinder on the new release of Tahr 6.0.5 using devx-6.0.5.sfs.

Post Reply