Difference between revisions of "Slackware 12.2"

From ZoneMinder Wiki
Jump to navigationJump to search
(Added some formatting and did a little clean up.)
Line 8: Line 8:


Nuck.
Nuck.
This guide should work with Slackware 13.0 as well.


== Install Slackware 12.2 ==
== Install Slackware 12.2 ==
Get a Slackware 12.2 system installed. -
Get a Slackware 12.2 system installed and a [http://stanley-garvey.com/lamp1.php AMP] setup running.  


Download the dvd from somewhere, burn it and boot it.  
Download the dvd from somewhere, use a torrent if you can.  Burn it and boot it.  


login and create your disk partitions by running fdisk  
Login and create your disk partitions by running fdisk or cfdisk.


run setup and install the system (I'm lazy, so I choose "install everything".)  
Run setup and install the system (I'm lazy, so I choose "install everything".)  


Be sure to enable httpd and mysqld.  
Be sure to enable httpd and mysqld.  


reboot and then login.
Reboot and then login.  
 
Edit /etc/httpd/httpd.conf and fix up apache by setting a hostname, enabling php and adding a virtual host.
 
run -
 
/etc/rc.d/rc.httpd restart
 
Edit /etc/httpd/php.ini and change short_open_tag to on.
 
== Set up your hardware ==
 
You will (or should) have to edit /etc/modprobe.conf to enable your capture card. (see note above)
 
At this point you may want to install XAWTV (see below) and verify that your hardware is working.
 
hint - I often see people posting in the forums, fighting with hardware not realizing that /dev/video will not work. Trust me, it won't ! /dev/videoX (where X is a number),  will. Make note of the device number. It's important.


== Set up MySql ==
Edit ''/etc/httpd/httpd.conf'' and fix up apache by setting a hostname, enabling php and adding a virtual host.


Copy one of the /etc/my-*.cnf files to /etc/my.cnf and edit as (if) required.  
Edit ''/etc/httpd/php.ini'' and ''change short_open_tag'' to ''On''.  


set up mysql databases with -
Run in a terminal:
<pre>
#/etc/rc.d/rc.httpd restart
</pre>


mysql_install_db --user=mysql
== Set Up Your Hardware ==


start mysqld - (needs to be running for perl tests)  
You will (or should) have to edit ''/etc/modprobe.conf'' to enable your capture card. (see note above)


/etc/rc.d/rc.mysqld start 
At this point you may want to install [[#Install XAWTV (Optional, but recommended)|XAWTV]] (see below) and verify that your hardware is working.


== Update Perl ==
'''Hint''' - I often see people posting in the forums, fighting with hardware not realizing that /dev/video will not work. Trust me, it won't ! /dev/videoX (where X is a number),  will. Make note of the device number. It's important.
== Set Up MySql ==


update perl and install any dependencies - (make life easy and accept all of the defaults.)  
Copy one of the ''/etc/my-*.cnf'' files to ''/etc/my.cnf'' and edit as (if) required.


perl -MCPAN -e shell
Set up mysql databases with:
<pre>
#mysql_install_db --user=mysql
</pre>
Start mysqld - (needs to be running for perl tests)
<pre>
#/etc/rc.d/rc.mysqld start 
</pre>
== Update Perl And Install Required Modules==


install MD5
Update perl and install any dependencies (make life easy and accept all of the defaults.)
<pre>
#perl -MCPAN -e shell


install Bundle::CPAN
cpan>install MD5


reload cpan  
cpan>install Bundle::CPAN


install LWP::UserAgent
cpan>reload cpan


install Date::Manip
cpan>install LWP::UserAgent


install MIME::Lite
cpan>install Date::Manip


install MIME::Entity
cpan>install MIME::Lite


install DBD::mysql
cpan>install MIME::Entity


install Sys::Mmap
cpan>install DBD::mysql


install X10::ActiveHome
cpan>install Sys::Mmap


install PHP::Serialization
cpan>install X10::ActiveHome


install Module::Load
cpan>install PHP::Serialization


cpan>install Module::Load
</pre>
== Install FFMPEG ==
== Install FFMPEG ==


install ffmpeg dependencies -
===Install ffmpeg dependencies===
 
go to http://darkstar.ist.utl.pt/slackware/addon/slacky/slackware-12.2/ , find, download and install the following - (they are all within 2 or 3 directories)


amrnb-7.0.0.2-i486-2as.tgz  
Go to http://darkstar.ist.utl.pt/slackware/addon/slacky/slackware-12.2/ , find, download and install the following packages - (they are all within 2 or 3 directories)
<pre>
multimedia/amrnb-7.0.0.2-i486-2as.tgz  


amrwb-7.0.0.3-i486-2as.tgz  
multimedia/amrwb-7.0.0.3-i486-2as.tgz  


dirac-1.0.0-i486-2as.tgz  
multimedia/dirac-1.0.0-i486-2as.tgz  


faac-1.26-i486-4sl.tgz  
multimedia/faac-1.26-i486-4sl.tgz  


faad2-2.6.1-i486-5sl.tgz  
multimedia/faad2-2.6.1-i486-5sl.tgz


imlib2-1.4.2-i486-3sl.tgz  
multimedia/lame-3.98.2-i486-2sl.tgz


lame-3.98.2-i486-2sl.tgz  
multimedia/speex-1.2rc1-i486-2dav.tgz  


libdc1394-2.1.0-i486-1sl.tgz  
multimedia/x264-20090107-i486-1as.tgz  


libgsm-1.0.12-i686-4as.tgz  
multimedia/xvidcore-1.2.1-i486-2sl.tgz  


libnut-20081213-i686-1as.tgz  
libraries/imlib2-1.4.2-i486-3sl.tgz  


libusb1-1.0.0-i486-1as.tgz  
libraries/libdc1394-2.1.0-i486-1sl.tgz  


schroedinger-1.0.5-i486-1as.tgz  
libraries/libgsm-1.0.12-i686-4as.tgz  


speex-1.2rc1-i486-2dav.tgz  
libraries/libnut-20081213-i686-1as.tgz  


x264-20090107-i486-1as.tgz  
libraries/libusb1-1.0.0-i486-1as.tgz  


xvidcore-1.2.1-i486-2sl.tgz  
libraries/schroedinger-1.0.5-i486-1as.tgz  
 
</pre>
Install ffmpeg - on the same site you pulled the previous files from, in the multimedia directory, find the ffmpeg directory, go into the src dir and get these 2 files
===Install ffmpeg===


On the same site you pulled the previous files from, in the multimedia directory, find the ffmpeg directory, go into the src dir and get these 2 files
<pre>
ffmpeg.SlackBuild  
ffmpeg.SlackBuild  


doinst.sh  
doinst.sh  
 
</pre>
then source the install file -  
Then source the install file -  
 
<pre>
. ./ffmpeg.SlackBuild  
. ./ffmpeg.SlackBuild  
</pre>
Which will download the latest svn, build it and create an installable .tgz. Install it once done.


which will download the latest svn, build it and create an installable .tgz. Install it once done.  
As an alternative, most of these packages can be built by using the build scripts at [http://slackbuilds.org/repository/12.2/ slackbuilds.org].


== Install XAWTV (Optional, but recommended) ==
== Install XAWTV (Optional, but recommended) ==


If you want XAWTV for setting up and testing hardware -
If you want XAWTV for setting up and testing hardware:
 
Download, build and install (read the included docs)


Download, build and install (read the included docs).
<pre>
tv-fonts-1.1.tar.bz2  
tv-fonts-1.1.tar.bz2  


Line 139: Line 145:


xawtv-20070625-114215.tar.gz  
xawtv-20070625-114215.tar.gz  
 
</pre>
when configuring zvbi and xawtv use the options --prefix=/usr and --sysconfdir=/etc  
When configuring zvbi and xawtv use the options --prefix=/usr and --sysconfdir=/etc  


== Install ZoneMinder ==
== Install ZoneMinder ==


download either ZM 1.23.3 or ZM 1.24  
Download ZM 1.23.3 or ZM 1.24.
 
untar and cd into the zm-"version" directory and run -
 
./configure --with-webdir=/var/www/htdocs --with-cgidir=/srv/httpd/cgi-bin \


--prefix=/usr --sysconfdir=/etc > configured_this 2>&1  
Untar and cd into the zm-"version" directory and run:
<pre>
#./configure --with-webdir=/var/www/htdocs --with-cgidir=/srv/httpd/cgi-bin --prefix=/usr --sysconfdir=/etc > configured_this 2>&1  
</pre>


then look through "configured_this" and if you are satisfied that all is good, run -
Take look through "configured_this" and if you are satisfied that all is good, run:


make > built_this 2>&1  
<pre>
#make > built_this 2>&1  
</pre>


then look through "built_this" and if you are satisfied that you got a clean build  
Look through "built_this" and if you are satisfied that you got a clean build go ahead and run:
run -


make install  
<pre>
#make install  
</pre>


or if you'd prefer to do a test run on make install, run -
If you'd prefer to do a test run on make install, run:


make -n install > install_this 2>&1  
<pre>
#make -n install > install_this 2>&1  
</pre>


look over install_this and if you are happy with what you see, then run make install
Look over install_this and if you are happy with what you see, then run make install


== Install database and finalize MySql installation ==
== Install ZM Database and Finalize MySql Installation ==


while in the zm-"version" directory run -
While in the zm-"version" directory run:
 
<pre>
mysql  
#mysql  


> source db/zm_create.sql  
> source db/zm_create.sql  
Line 180: Line 190:


> quit;  
> quit;  
</pre>


and then run
Then run:
<pre>
#mysqladmin reload
</pre>


mysqladmin reload
Set a root password for mysql and lock it down. Run the following:
 
<pre>
set a root password for mysql and lock it down. run the following -
#mysql_secure_installation  
 
</pre>
mysql_secure_installation  
And finally:
 
<pre>
and finally  
#cp scripts/zm /etc/rc.d/rc.zm  
 
cp scripts/zm /etc/rc.d/rc.zm
 
chmod a+x /etc/rc.d/rc.zm  


#chmod a+x /etc/rc.d/rc.zm
</pre>
And now, fire up ZoneMinder
And now, fire up ZoneMinder
<pre>
#/etc/rc.d/rc.zm start
</pre>


/etc/rc.d/rc.zm start  
To start ZoneMinder at boot, run:
 
<pre>
To have ZoneMinder start at boot -
#echo "/etc/rc.d/rc.zm start " /etc/rc,d/rc.local
 
</pre>
echo "/etc/rc.d/rc.zm start " /etc/rc,d/rc.local
 
And you're done ..
And you're done ..


== Test it out ==
== Test It Out ==
 
from a commandline prompt run -


startx
From a command line prompt run:


start up a browser and point it at http://localhost/zm
<pre>
$startx
</pre>
Start up a browser and point it at http://localhost/zm


If all went well, you should see a ZoneMinder control panel.
If all went well, you should see a ZoneMinder control panel.

Revision as of 11:28, 23 January 2010

This guide is rough looking, with little formatting and therefore subject to reader interpretation.

This page is only intended to aid in getting a Slackware 12.2 system up and running with ZoneMinder installed. I have intentionally avoided gettng into the specifics of hardware and apache setup simply because there are too many variables to consider. As far as hardware goes, chances are good that if your hardware is supported by the Video For Linux drivers, it will work with ZoneMinder.

For help with anything that I haven't specifically addressed in this guide or more in depth help, I suggest that you keep in mind that "Google is your friend" .

Hope it helps,

Nuck.

This guide should work with Slackware 13.0 as well.

Install Slackware 12.2

Get a Slackware 12.2 system installed and a AMP setup running.

Download the dvd from somewhere, use a torrent if you can. Burn it and boot it.

Login and create your disk partitions by running fdisk or cfdisk.

Run setup and install the system (I'm lazy, so I choose "install everything".)

Be sure to enable httpd and mysqld.

Reboot and then login.

Edit /etc/httpd/httpd.conf and fix up apache by setting a hostname, enabling php and adding a virtual host.

Edit /etc/httpd/php.ini and change short_open_tag to On.

Run in a terminal:

#/etc/rc.d/rc.httpd restart

Set Up Your Hardware

You will (or should) have to edit /etc/modprobe.conf to enable your capture card. (see note above)

At this point you may want to install XAWTV (see below) and verify that your hardware is working.

Hint - I often see people posting in the forums, fighting with hardware not realizing that /dev/video will not work. Trust me, it won't ! /dev/videoX (where X is a number), will. Make note of the device number. It's important.

Set Up MySql

Copy one of the /etc/my-*.cnf files to /etc/my.cnf and edit as (if) required.

Set up mysql databases with:

#mysql_install_db --user=mysql 

Start mysqld - (needs to be running for perl tests)

#/etc/rc.d/rc.mysqld start  

Update Perl And Install Required Modules

Update perl and install any dependencies (make life easy and accept all of the defaults.)

#perl -MCPAN -e shell 

cpan>install MD5 

cpan>install Bundle::CPAN 

cpan>reload cpan 

cpan>install LWP::UserAgent 

cpan>install Date::Manip 

cpan>install MIME::Lite 

cpan>install MIME::Entity 

cpan>install DBD::mysql 

cpan>install Sys::Mmap 

cpan>install X10::ActiveHome 

cpan>install PHP::Serialization 

cpan>install Module::Load 

Install FFMPEG

Install ffmpeg dependencies

Go to http://darkstar.ist.utl.pt/slackware/addon/slacky/slackware-12.2/ , find, download and install the following packages - (they are all within 2 or 3 directories)

multimedia/amrnb-7.0.0.2-i486-2as.tgz 

multimedia/amrwb-7.0.0.3-i486-2as.tgz 

multimedia/dirac-1.0.0-i486-2as.tgz 

multimedia/faac-1.26-i486-4sl.tgz 

multimedia/faad2-2.6.1-i486-5sl.tgz

multimedia/lame-3.98.2-i486-2sl.tgz

multimedia/speex-1.2rc1-i486-2dav.tgz 

multimedia/x264-20090107-i486-1as.tgz 

multimedia/xvidcore-1.2.1-i486-2sl.tgz 

libraries/imlib2-1.4.2-i486-3sl.tgz 

libraries/libdc1394-2.1.0-i486-1sl.tgz 

libraries/libgsm-1.0.12-i686-4as.tgz 

libraries/libnut-20081213-i686-1as.tgz 

libraries/libusb1-1.0.0-i486-1as.tgz 

libraries/schroedinger-1.0.5-i486-1as.tgz 

Install ffmpeg

On the same site you pulled the previous files from, in the multimedia directory, find the ffmpeg directory, go into the src dir and get these 2 files

ffmpeg.SlackBuild 

doinst.sh 

Then source the install file -

. ./ffmpeg.SlackBuild 

Which will download the latest svn, build it and create an installable .tgz. Install it once done.

As an alternative, most of these packages can be built by using the build scripts at slackbuilds.org.

Install XAWTV (Optional, but recommended)

If you want XAWTV for setting up and testing hardware:

Download, build and install (read the included docs).

tv-fonts-1.1.tar.bz2 

zvbi-0.2.33.tar.bz2 

xawtv-20070625-114215.tar.gz 

When configuring zvbi and xawtv use the options --prefix=/usr and --sysconfdir=/etc

Install ZoneMinder

Download ZM 1.23.3 or ZM 1.24.

Untar and cd into the zm-"version" directory and run:

#./configure --with-webdir=/var/www/htdocs --with-cgidir=/srv/httpd/cgi-bin --prefix=/usr --sysconfdir=/etc > configured_this 2>&1 

Take look through "configured_this" and if you are satisfied that all is good, run:

#make > built_this 2>&1 

Look through "built_this" and if you are satisfied that you got a clean build go ahead and run:

#make install 

If you'd prefer to do a test run on make install, run:

#make -n install > install_this 2>&1 

Look over install_this and if you are happy with what you see, then run make install

Install ZM Database and Finalize MySql Installation

While in the zm-"version" directory run:

#mysql 

> source db/zm_create.sql 

> use mysql; 

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

> quit; 

Then run:

#mysqladmin reload 

Set a root password for mysql and lock it down. Run the following:

#mysql_secure_installation 

And finally:

#cp scripts/zm /etc/rc.d/rc.zm 

#chmod a+x /etc/rc.d/rc.zm 

And now, fire up ZoneMinder

#/etc/rc.d/rc.zm start 

To start ZoneMinder at boot, run:

#echo "/etc/rc.d/rc.zm start " /etc/rc,d/rc.local

And you're done ..

Test It Out

From a command line prompt run:

$startx

Start up a browser and point it at http://localhost/zm

If all went well, you should see a ZoneMinder control panel.