ZoneMinder video camera security and surveillance: Difference between revisions
(Added missing required packages) |
(No longer requires edge; Added missing required packages; Replaced mysql with mariadb as requred; Added DROP privilege as required by setup step; Added required permission change to use lighttpd; Added missing setup step) |
||
Line 1: | Line 1: | ||
ZoneMinder usually runs with apache, but in this short howto we use lighttpd. | ZoneMinder usually runs with apache, but in this short howto we use lighttpd. | ||
First add the needed packages to our system | First add the needed packages to our system | ||
apk add zoneminder | apk add zoneminder mysql mysql-client lighttpd php-fpm php-pdo php-pdo_mysql | ||
Initialize mysql database | Initialize mysql database | ||
/etc/init.d/ | /etc/init.d/mariadb setup | ||
set root password for mysql as instructed by mysql setup | set root password for mysql as instructed by mysql setup | ||
Line 19: | Line 17: | ||
mysql> CREATE USER zm@localhost IDENTIFIED BY 'your_zm_password_as_set_in_config'; | 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; | mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE, DROP on zm.* to zm@localhost; | ||
We are running lighttpd so lets run php-fpm as lighttpd user/group | We are running lighttpd so lets run php-fpm as lighttpd user/group | ||
Line 44: | Line 42: | ||
vim /etc/zm.conf | vim /etc/zm.conf | ||
Change ownership of zm.conf to lighttpd | |||
chown lighttpd.lighttpd /etc/zm.conf | |||
Edit lighttpd cgi config and add old style cgi support by adding to cgi.assign | Edit lighttpd cgi config and add old style cgi support by adding to cgi.assign | ||
Line 60: | Line 62: | ||
vim /etc/lighttpd/lighttpd.conf | vim /etc/lighttpd/lighttpd.conf | ||
Initialize the zoneminder database | |||
/etc/init.d/zoneminder setup | |||
Start zoneminder | Start zoneminder | ||
Line 66: | Line 72: | ||
Profit! | Profit! | ||
To access zoneminder, browse to http://yourserver/zm/ |
Revision as of 02:45, 22 August 2015
ZoneMinder usually runs with apache, but in this short howto we use lighttpd.
First add the needed packages to our system
apk add zoneminder mysql mysql-client lighttpd php-fpm php-pdo php-pdo_mysql
Initialize mysql database
/etc/init.d/mariadb 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, DROP 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.
Change the ZoneMinder user (ZM_WEB_USER) and group (ZM_WEB_GROUP) to lighttpd
And set ZM_SERVER_HOST to your zoneMinder hostname/ipaddress
vim /etc/zm.conf
Change ownership of zm.conf to lighttpd
chown lighttpd.lighttpd /etc/zm.conf
Edit lighttpd cgi config and add old style cgi support by adding to cgi.assign
vim /etc/lighttpd/mod_cgi.conf
which should look like
cgi.assign = ( "" => "", ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
Edit lighttpd.conf and uncomment mod_cgi.conf
vim /etc/lighttpd/lighttpd.conf
Initialize the zoneminder database
/etc/init.d/zoneminder setup
Start zoneminder
/etc/init.d/zoneminder start
Profit!
To access zoneminder, browse to http://yourserver/zm/