ZoneMinder 1.22.2 on SuSE 10.1
Posted: Fri Oct 06, 2006 10:25 pm
Dgsconseil was kind enough to write a step-by-step newbie kit to install ZoneMinder under SUSE 10.0 OSS. I copied it and modified it to for SuSE 10.1 with a GUI and the KDE.
This is only a short How-To on how I installed SuSE and ZoneMinder software on SUSE 10.1 OSS, it is not intended to be a reference because I do not specify any of the security rules or optimizations needed for a production server. I just specify the main steps to get Zone Minder Running.
By the way, this is not the smallest installation possible. It’s just what I used and it worked. It seemed that if I skipped any of the additional packages, I’d run into trouble. Although, you can probably do without the Open Office.
Fresh install Suse 10.1 OSS (CD install)
Base installation with KDE Desktop and additional packages
If using the firewall, add HTTP Server to the Allowed Services list, if you want to access ZoneMinder with a web browser.
Once the Installation is finished, open the YAST control center. (Under System)
If you have an internet connection: In YAST, add packman as an http installation source (used to install ffmpeg)
Go into YAST Software Management
Verify that these packages are installed
Install any that are missing (Enter each name in Search box)
Updating perl CPANand installing perl packages
I've done all off the perl related installation under user root because of problems with cpan packages installation. It seems like a slow process, have patience.
Configure servers to be started at boot time
Start servers manually
Downloading and installing latest Zoneminder release (v1.22.2) :
Download and save ZoneMinder tarball from:
http://www2.zoneminder.com/downloads/Zo ... 2.2.tar.gz
Extract tarball
Download and apply the v1.22.2 patch for ffmpeg from Wiki:
http://www.zoneminder.com/wiki/index.php/1.22.2_Patches
To apply the patch you should do the following :-
Now Configuration Time !
Make sure you’re in the ZoneMinder-1.22.2 directory and Login to MySQL (PW is blank)
Under MySQL prompt type
Now compile and install this nice piece of software !
Configure ZoneMinder to be started at boot time
Logoff and logon as root, or create a new session as root.
Edit /etc/rc.d/zm with your favorite text editor (kwrite ?)
Copy the /srv/www/htdocs/zm.php file on top of the /srv/www/htdocs/index.php file.
Rename or delete the /srv/www/htdocs/index.html file
Deal with the Shared Memory problem
(I chose 256,000,000 because my cams are 640x480)
Add the following lines to your /etc/sysctl.conf file:
Now you can reboot your computer to apply changes
Start all servers if they are not allready started when you boot your computer :
Now open your web browser and point to http://localhost/
If that doesn’t work, try http://localhost/zm.php
Create your monitor and start playing !
Here are some options I use when configuring a monitor for my Axis IP camera at 640x480, color.:
Under the General Tab
Source Type = Remote
Function = Modetect
Enabled = Checked
Linked Monitors = (leave it blank)
Maximum FPS = 4.0
Alarm Maximum FPS = 8.0
Under the Source Tab
Remote host name = IP of camera (i.e. 192.168.3.2)
Remote Host Port = 80
Remote Host Path = /axis-cgi/jpg/image.cgi?resolution=640x480
Remote Image Colours = 24 bit colour
Capture Width = 640
Capture Height = 480
If you want to utilize mpeg instead of jpeg, use this for the host path:
Remote Host Path = /axis-cgi/mjpg/video.cgi?
Additional Information:
ZoneMinder Logs are in /tmp
zmaudit.log
zmupdate.log
zmwatch.log => take attention to this one because the shared memory problem is reported here
zmpkg.log
zmdc.log
Apache2 Logs are in /var/logs/apache2
This is only a short How-To on how I installed SuSE and ZoneMinder software on SUSE 10.1 OSS, it is not intended to be a reference because I do not specify any of the security rules or optimizations needed for a production server. I just specify the main steps to get Zone Minder Running.
By the way, this is not the smallest installation possible. It’s just what I used and it worked. It seemed that if I skipped any of the additional packages, I’d run into trouble. Although, you can probably do without the Open Office.
Fresh install Suse 10.1 OSS (CD install)
Base installation with KDE Desktop and additional packages
Code: Select all
Additional Software Packages chosen during install:
- Graphical Base system
- KDE Desktop Environment
- All of KDE
- Help and Supports Docs
- Office applications
- Multimedia
- Simple Web Server with Apache2
- LDAP Server and Tools
- Network and Server
- C/C++ Complier and Tools
- Kernel Development
- KDE Development
- TCL/TK development system
- Java
- Experienced user
- LaTex, SGML and XML
Once the Installation is finished, open the YAST control center. (Under System)
If you have an internet connection: In YAST, add packman as an http installation source (used to install ffmpeg)
Code: Select all
Type : HTTP
Server : packman.unixheads.com
Path : suse/10.1
Verify that these packages are installed
Install any that are missing (Enter each name in Search box)
Code: Select all
apache2
apache2-worker
apache2-mod_perl
apache2-mod_php5
apache2-mod-apparmor
php5
mysql
mysql-devel
gcc
gcc-c++
libmpeg2
libmpeg2-devel
ffmpeg
libffmpeg0
libffmpeg0-devel
libjpeg
libjpeg-devel
pcre-devel
xawtv
openssl-devel
I've done all off the perl related installation under user root because of problems with cpan packages installation. It seems like a slow process, have patience.
Code: Select all
(From a terminal window)
perl -MCPAN -e shell
install Bundle::CPAN
reload CPAN
install Archive::Tar (seems to be optional => depend on the way you install yourdistro)
install Archive::Zip (seems to be optional => depend on the way you install yourdistro)
install MIME::Lite
install MIME::Tools
install DateTime
install Date::Manip updated 2006-03-04 thanx to mickecarlsson
install Bundle::libnet
install Device::SerialPort
install Astro::SunTime Updated 2006 03 24 correct spelling error on SunTime (thanx to mickecarlsson)
install X10
Code: Select all
(In a terminal window (command shell))
su - cd /etc/rc.d/rc5.d
ln -s ../apache2 S98apache2
ln -s ../apache2 K01apache2
ln -s ../mysql S98mysql
ln -s ../mysql K01mysql
Code: Select all
(In a terminal window (command shell))
sudo /etc/rc.d/apache2 start
sudo /etc/rc.d/mysql start
Download and save ZoneMinder tarball from:
http://www2.zoneminder.com/downloads/Zo ... 2.2.tar.gz
Extract tarball
Code: Select all
In a Terminal window, inside directory that ZoneMinder download was saved to
tar zxvf ZoneMinder-1.22.2.tar.gz
cd ZoneMinder-1.22.2
http://www.zoneminder.com/wiki/index.php/1.22.2_Patches
To apply the patch you should do the following :-
Code: Select all
·Download the patch and move a copy to your ZoneMinder build directory
· Open a command shell (terminal window)
· Change directory to your ZoneMinder build directory
· Apply the patch by typing
patch -p0 < zm-1.22.2-ffmpeg.patch
· Check that the patch is applied correctly and you do not get any rejects
· If necessary rebuild, then reinstall
Code: Select all
(be sure you are in ZoneMinder-1.22.2 directory)
./configure --with-webdir=/srv/www/htdocs --with-cgidir=/srv/www/cgi-bin --with-webgroup=www --with-webuser=wwwrun ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zm ZM_DB_PASS=zm
Code: Select all
mysql -h localhost -u root -p
Code: Select all
(Entering Each line may echo some additional lines, just ignore them)
source db/zm_create.sql;
grant select,insert,update,delete on zm.* to 'zm'@localhost identified by 'zm';
flush privileges;
quit
Code: Select all
(be sure you are in ZoneMinder-1.22.2 directory)
make
sudo make install
Configure ZoneMinder to be started at boot time
Code: Select all
su -
# from zoneminder source directory
cp scripts/zm /etc/rc.d cd /etc/rc.d
chmod +x zm
cd rc5.d
ln -s ../zm S99zm
ln -s ../zm K00zm
Edit /etc/rc.d/zm with your favorite text editor (kwrite ?)
Code: Select all
remove the line related to include functions
replace all occurences of echo_success by echo success
replace all occurences of echo_failure by echo failure
save the changes
Rename or delete the /srv/www/htdocs/index.html file
Deal with the Shared Memory problem
(I chose 256,000,000 because my cams are 640x480)
Add the following lines to your /etc/sysctl.conf file:
Code: Select all
# Memory modifications for ZoneMinder
kernel.shmall = 256000000
kernel.shmmax = 256000000
Start all servers if they are not allready started when you boot your computer :
Code: Select all
(From within a Terminal window)
sudo /etc/rc.d/apache2 start
sudo /etc/rc.d/mysql start
sudo zmpkg.pl start
If that doesn’t work, try http://localhost/zm.php
Create your monitor and start playing !
Here are some options I use when configuring a monitor for my Axis IP camera at 640x480, color.:
Under the General Tab
Source Type = Remote
Function = Modetect
Enabled = Checked
Linked Monitors = (leave it blank)
Maximum FPS = 4.0
Alarm Maximum FPS = 8.0
Under the Source Tab
Remote host name = IP of camera (i.e. 192.168.3.2)
Remote Host Port = 80
Remote Host Path = /axis-cgi/jpg/image.cgi?resolution=640x480
Remote Image Colours = 24 bit colour
Capture Width = 640
Capture Height = 480
If you want to utilize mpeg instead of jpeg, use this for the host path:
Remote Host Path = /axis-cgi/mjpg/video.cgi?
Additional Information:
ZoneMinder Logs are in /tmp
zmaudit.log
zmupdate.log
zmwatch.log => take attention to this one because the shared memory problem is reported here
zmpkg.log
zmdc.log
Apache2 Logs are in /var/logs/apache2