Difference between revisions of "Gentoo Install"

From ZoneMinder Wiki
Jump to navigationJump to search
(→‎ZoneMinder Installation: Sliming down old information - readying for new guide install via emerge / gentoo's main repo)
(→‎ZoneMinder Installation: zoneminder is in main repo so no longer need to add 3rd party with layman)
Line 87: Line 87:
* Defining Monitors
* Defining Monitors
* Defining Zones
* Defining Zones
====Easy way====
emerge layman
layman -o http://gpo.zugaina.org/lst/gpo-repositories.xml
layman -a zugaina
add "source /var/lib/layman/make.conf" to /etc/make.conf
ACCEPT_KEYWORDS="~x86" emerge -av zoneminder
(link http://hsiliev.blogspot.com/2011/11/installing-zoneminder-in-gentoo.html)


==Maintaining the System==
==Maintaining the System==

Revision as of 15:14, 18 April 2017

About Gentoo

Gentoo is a distribution that prides itself on being extra-configurable, processor native, and easy to update. Gentoo users usually compile their installation from srouce, but while it's great to nitpick on the details, Gentoo also has the option of installing a precompiled system quickly from a LiveCD.

Why Gentoo?

  • Other distros have a one-size-fits-all approach, including full GUI environments unnecessary for a ZoneMinder CCTV DVR box.
  • Binary distributions make it difficult to locate the appropriate libraries for ZoneMinder to build properly. Packages for these distrubutions often do not include development libraries and headers necessary for building software from source.
  • A Gentoo system is highly configurable, and is easy to update and maintain.
  • Gentoo's portage package system in conjunction with the emerge command makes it much easier to obtain the needed packages for ZoneMinder and whatever else you might need.

What You Will Need

  • A Gentoo LiveCD
  • An internet connection, to download and install the necessary packages

About ZoneMinder for Gentoo

There are some ZoneMinder packages (called 'ebuilds') available for Gentoo in the 'portage' tree. However, they are not readily available in the mainstream portage tree and are a few releases behind. In addition, these ebuids have questionable configurability. It is best to compile from source.

The Zoneminder ebuilds are currently (Feb 2007) masked. You will need to unmask the package

 # cat /etc/portage/package.keywords |grep zone
www-misc/zoneminder ~x86         

you may also want to add the version to /etc/portage/package/unmask

# cat /etc/portage/package.unmask
=www-misc/zoneminder-1.22.3
 #           

the current ebuild doesnt bring in (or start apache), so you will need apache,php, and mysql

config file

configure the included config file . Heres my working version. It includes the database username/password

chickcam ~ # grep ^[A-Za-z] /etc/zm.conf
ZM_VERSION=1.22.3
ZM_PATH_BUILD=>/usr/share/zoneminder
ZM_TIME_BUILD=1170184168
ZM_PATH_BIN=/usr/bin
ZM_PATH_LIB=/usr/lib
ZM_PATH_CONF=/etc
ZM_PATH_WEB   =/
ZM_PATH_CGI =/var/www/localhost/cgi-bin
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
ZM_DB_HOST=localhost
ZM_DB_NAME=zm
ZM_DB_USER=zm
ZM_DB_PASS=xxxxx
chickcam ~ #     

configuring the camera

I started with 1 camera plugged into localhost.

It may need modules (spca5xx, gspca,etc ) which you will have to emerge or recompile in your kernel

Initially i had a broken image. I checked /dev/video0 had appeared once the camera was configured and changed the permissions to 777

~ # ls -la /dev/video0
lrwxrwxrwx 1 root root 10 Feb 14 18:05 /dev/video0 -> v4l/video0

~ #

In spite of this I had to add the webserver user ( apache ) to the video Italic text group to get the images to display

Installation of Gentoo Linux

Gentoo has its own comprehensive install guide which is regularly updated, this can be found in the Gentoo Handbook.


Additional Packages

You may also want to install:

  • pciutils, to get information about PCI devices to assist in troubleshooting.
  • usbutils, to get information about USB devices to assist in troubleshooting.
  • syslog-ng, to manage system logs. ZoneMinder will need to be configured to use it. (/etc/syslog-ng/syslog-ng.conf)
  • vixie-cron, for ZoneMinder to complete scheduled cron jobs.
  • samba, to exchange files with Windows clients/servers.
  • camsource, lets you serve up web images from your capture card. Can be useful for diagnosis.

These packages are easily installed by typing emerge -a <package_name>

ZoneMinder Installation

Overview of ZoneMinder Installation

  • Building ZoneMinder
  • Configuration
  • Initializing the Database
  • Defining Monitors
  • Defining Zones

Maintaining the System

Watchdogs

Avoiding a Full Disk

Automatic FTP of Events

Purge When Full Script