Difference between revisions of "Gentoo Install"

From ZoneMinder Wiki
Jump to navigationJump to search
(→‎configuring the camera: removed old v4l - most installs will be via ip cameras now so this is redundant - would suggest separate research where required)
(Duplicate / obvious information removed - Gentoo's install handbook covers this if really needed)
 
(4 intermediate revisions by 2 users not shown)
Line 7: Line 7:
* A Gentoo system is highly configurable, and is easy to update and maintain.
* 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.
* 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 [http://www.gentoo.org/main/en/where.xml Gentoo LiveCD]
* An internet connection, to download and install the necessary packages.


== Installation of Gentoo Linux ==
== Installation of Gentoo Linux ==
Line 24: Line 20:
</pre>
</pre>


you may also want to add the version to /etc/portage/package/unmask
you may also want to add the version to /etc/portage/package.unmask
<pre># nano /etc/portage/package.unmask
<pre># nano /etc/portage/package.unmask
=www-misc/zoneminder-1.30.2
=www-misc/zoneminder-1.30.2
Line 38: Line 34:


<pre>
<pre>
mysql_secure_installation
emerge --config mariadb
</pre>
</pre>


Line 55: Line 51:




=== config file ===
=== Config File ===
 
ZoneMinder's config file is located at /etc/zm.conf
 
A default install will only require your database details to be updated.


configure the included config file . Heres my working version. It includes the database username/password
<pre>
<pre>
chickcam ~ # grep ^[A-Za-z] /etc/zm.conf
ZM_DB_USER=zmuser
ZM_VERSION=1.22.3
ZM_DB_PASS=zmpass
ZM_PATH_BUILD=>/usr/share/zoneminder
</pre>                         
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 ~ #    </pre>                         


==== Additional Packages ====
==== Additional Packages ====
Line 90: Line 76:
====Automatic FTP of Events====
====Automatic FTP of Events====
====Purge When Full Script====
====Purge When Full Script====
The default install includes a purge script that will clear frames at 95% disk capacity. This can be modifed under "Filters".

Latest revision as of 10:30, 25 August 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.

Installation of Gentoo Linux

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

Installing ZoneMinder for Gentoo

There are some ZoneMinder packages (called 'ebuilds') available for Gentoo in the 'portage' tree. https://packages.gentoo.org/packages/www-misc/zoneminder

The ZoneMinder ebuilds are currently (April 2017) masked. You will need to unmask the package

# nano /etc/portage/package.keywords
www-misc/zoneminder ~amd64

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

# nano /etc/portage/package.unmask
=www-misc/zoneminder-1.30.2

After unmasking you can now install via the emerge command.

emerge --ask zoneminder

ZoneMinder currently depends on mysql. Gentoo will install dev-db/maria by default unless you configure otherwise. This will need to be configured prior to running ZoneMinder and adding its database.

emerge --config mariadb

Once configured, you will need to add the zm database and install the default tables.

mysql -uroot -p -e "create database zm;"
mysql -uroot -p zm < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p

mysql> use zm; grant select,insert,update,lock tables,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
mysql> flush privileges;
mysql> exit;


Config File

ZoneMinder's config file is located at /etc/zm.conf

A default install will only require your database details to be updated.

ZM_DB_USER=zmuser
ZM_DB_PASS=zmpass

Additional Packages

You may also want to install:

  • pciutils - this is useful if you have pci based capture cards, probably not required if you intend to use IP cameras.
  • usbutils - same as pciutils for usb cameras, may not be required.
  • samba - to exchange files with Windows clients/servers.

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

Maintaining the System

Watchdogs

Avoiding a Full Disk

Automatic FTP of Events

Purge When Full Script

The default install includes a purge script that will clear frames at 95% disk capacity. This can be modifed under "Filters".