ZoneMinder video camera security and surveillance: Difference between revisions

From Alpine Linux
No edit summary
No edit summary
Line 5: Line 5:
First add the needed packages to our system
First add the needed packages to our system


  apk add zoneminder@edge mysql mysql-client lighttpd php-fpm
  apk add zoneminder@edge mysql mysql-client lighttpd php-fpm # add phpmyadmin if you like to manage mysql from web interface


Initialize mysql database
Initialize mysql database
Line 21: Line 21:
  mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zm@localhost;
  mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zm@localhost;


We are running lighttpd so lets run php-fpm as lightppd user/group
We are running lighttpd so lets run php-fpm as lighttpd user/group


  vim /etc/php/php-fpm.conf
  vim /etc/php/php-fpm.conf
Line 29: Line 29:
  vim /etc/lighttpd/lighttpd.conf
  vim /etc/lighttpd/lighttpd.conf


start php-fmp
start php-fpm


  /etc/init.d/php-fpm start
  /etc/init.d/php-fpm start
Line 37: Line 37:
  /etc/init.d/lighttpd start
  /etc/init.d/lighttpd start


Set the MySQL database name, hostname, username, password.
Set the MySQL hostname, username, password.
 
And change the ZoneMinder user (ZM_WEB_USER) and group (ZM_WEB_GROUP) to lighttpd
And change the ZoneMinder user (ZM_WEB_USER) and group (ZM_WEB_GROUP) to lighttpd


  vim /etc/zm.conf
  vim /etc/zm.conf

Revision as of 17:44, 24 June 2014

Currently zoneminder has to be installed from edge, make sure you have edge as pinned repo when you use stable.

ZoneMinder usually runs with apache, but in this short howto we use lighttpd.

First add the needed packages to our system

apk add zoneminder@edge mysql mysql-client lighttpd php-fpm # add phpmyadmin if you like to manage mysql from web interface

Initialize mysql database

/etc/init.d/mysql setup

set root password for mysql as instructed by mysql setup

Create a zoneminder MySQL database and user

mysql> create database zm;
mysql> CREATE USER zm@localhost IDENTIFIED BY 'your_zm_password_as_set_in_config';
mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zm@localhost;

We are running lighttpd so lets run php-fpm as lighttpd user/group

vim /etc/php/php-fpm.conf

uncomment the php cgi fpm config in lighttpd.conf

vim /etc/lighttpd/lighttpd.conf

start php-fpm

/etc/init.d/php-fpm start

start lighttpd

/etc/init.d/lighttpd start

Set the MySQL hostname, username, password. And change the ZoneMinder user (ZM_WEB_USER) and group (ZM_WEB_GROUP) to lighttpd

vim /etc/zm.conf