<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pboin</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pboin"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Pboin"/>
	<updated>2026-04-25T22:41:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ZoneMinder_video_camera_security_and_surveillance&amp;diff=14706</id>
		<title>ZoneMinder video camera security and surveillance</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ZoneMinder_video_camera_security_and_surveillance&amp;diff=14706"/>
		<updated>2018-03-02T14:55:10Z</updated>

		<summary type="html">&lt;p&gt;Pboin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://www.zoneminder.com/ ZoneMinder] usually runs with [[Apache]], but in this short how-to we use [[Lighttpd]].&lt;br /&gt;
&lt;br /&gt;
First, add the needed packages to our system&lt;br /&gt;
&lt;br /&gt;
 apk add zoneminder mysql mysql-client lighttpd php5-fpm php5-pdo php5-pdo_mysql&lt;br /&gt;
&lt;br /&gt;
Initialize [https://www.mysql.com/ MySQL] database&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/mariadb setup&lt;br /&gt;
&lt;br /&gt;
Set root password for MySQL as instructed by MySQL setup&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/mysqladmin -u root password &#039;your_secure_root_mysql_password&#039;&lt;br /&gt;
&lt;br /&gt;
Create a ZoneMinder MySQL database and user&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; CREATE USER zm@localhost IDENTIFIED BY &#039;your_zm_password_as_set_in_config&#039;;&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE, DROP on zm.* to zm@localhost;&lt;br /&gt;
&lt;br /&gt;
We are running &amp;lt;code&amp;gt;lighttpd&amp;lt;/code&amp;gt;, so let&#039;s run &amp;lt;code&amp;gt;php-fpm&amp;lt;/code&amp;gt; as lighttpd user/group&lt;br /&gt;
&lt;br /&gt;
 vim /etc/php5/php-fpm.conf&lt;br /&gt;
&lt;br /&gt;
Which should look like:&lt;br /&gt;
&lt;br /&gt;
 ; Unix user/group of processes&lt;br /&gt;
 ; Note: The user is mandatory. If the group is not set, the default user&#039;s group&lt;br /&gt;
 ;       will be used.&lt;br /&gt;
 ;user = nobody&lt;br /&gt;
 ;group = nobody&lt;br /&gt;
 user = lighttpd&lt;br /&gt;
 group = lighttpd&lt;br /&gt;
&lt;br /&gt;
Enable the php cgi fpm config in &amp;lt;code&amp;gt;lighttpd.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 vim /etc/lighttpd/lighttpd.conf&lt;br /&gt;
&lt;br /&gt;
Go down to the includes section, it should look like:&lt;br /&gt;
 # {{{ includes&lt;br /&gt;
 include &amp;quot;mime-types.conf&amp;quot;&lt;br /&gt;
 # uncomment for cgi support&lt;br /&gt;
    include &amp;quot;mod_cgi.conf&amp;quot;&lt;br /&gt;
 # uncomment for php/fastcgi support&lt;br /&gt;
 #   include &amp;quot;mod_fastcgi.conf&amp;quot;&lt;br /&gt;
 # uncomment for php/fastcgi fpm support&lt;br /&gt;
    include &amp;quot;mod_fastcgi_fpm.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # }}}&lt;br /&gt;
&lt;br /&gt;
Edit lighttpd cgi config and add old style cgi support by adding to cgi.assign&lt;br /&gt;
&lt;br /&gt;
 vim /etc/lighttpd/mod_cgi.conf&lt;br /&gt;
&lt;br /&gt;
which should look like&lt;br /&gt;
&lt;br /&gt;
 cgi.assign = (&lt;br /&gt;
     &amp;quot;&amp;quot;      =&amp;gt;      &amp;quot;&amp;quot;,&lt;br /&gt;
     &amp;quot;.pl&amp;quot;   =&amp;gt;      &amp;quot;/usr/bin/perl&amp;quot;,&lt;br /&gt;
     &amp;quot;.cgi&amp;quot;  =&amp;gt;      &amp;quot;/usr/bin/perl&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
Start php-fpm&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/php-fpm start&lt;br /&gt;
&lt;br /&gt;
Start lighttpd&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/lighttpd start&lt;br /&gt;
&lt;br /&gt;
Set the MySQL hostname, username, password.&lt;br /&gt;
&lt;br /&gt;
Change the ZoneMinder user (&amp;lt;code&amp;gt;ZM_WEB_USER&amp;lt;/code&amp;gt;) and group (&amp;lt;code&amp;gt;ZM_WEB_GROUP&amp;lt;/code&amp;gt;) to lighttpd&lt;br /&gt;
&lt;br /&gt;
And set &amp;lt;code&amp;gt;ZM_SERVER_HOST&amp;lt;/code&amp;gt; to your ZoneMinder hostname/ipaddress&lt;br /&gt;
&lt;br /&gt;
 vim /etc/zm.conf&lt;br /&gt;
&lt;br /&gt;
Which should look like:&lt;br /&gt;
&lt;br /&gt;
 # Username and group that web daemon (httpd/apache) runs as&lt;br /&gt;
 ZM_WEB_USER=lighttpd&lt;br /&gt;
 ZM_WEB_GROUP=lighttpd&lt;br /&gt;
&lt;br /&gt;
 # ZoneMinder database type: so far only mysql is supported&lt;br /&gt;
 ZM_DB_TYPE=mysql&lt;br /&gt;
 &lt;br /&gt;
 # ZoneMinder database hostname or ip address&lt;br /&gt;
 ZM_DB_HOST=localhost&lt;br /&gt;
 &lt;br /&gt;
 # ZoneMinder database name&lt;br /&gt;
 ZM_DB_NAME=zm&lt;br /&gt;
 &lt;br /&gt;
 # ZoneMinder database user&lt;br /&gt;
 ZM_DB_USER=zm&lt;br /&gt;
 &lt;br /&gt;
 # ZoneMinder database password&lt;br /&gt;
 ZM_DB_PASS=your_zm_password_as_set_in_config&lt;br /&gt;
 &lt;br /&gt;
 # Host of this machine&lt;br /&gt;
 ZM_SERVER_HOST=yourserver&lt;br /&gt;
&lt;br /&gt;
Change ownership of &amp;lt;code&amp;gt;zm.conf&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;lighttpd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 chown lighttpd.lighttpd /etc/zm.conf&lt;br /&gt;
&lt;br /&gt;
Initialize the ZoneMinder database&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/zoneminder setup&lt;br /&gt;
&lt;br /&gt;
Start ZoneMinder&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/zoneminder start&lt;br /&gt;
&lt;br /&gt;
Profit!&lt;br /&gt;
&lt;br /&gt;
To access ZoneMinder, browse to http://yourserver/zm/&lt;br /&gt;
&lt;br /&gt;
To make it start automatically on boot:&lt;br /&gt;
&lt;br /&gt;
 rc-update add lighttpd default&lt;br /&gt;
 rc-update add mariadb default&lt;br /&gt;
 rc-update add php-fpm default&lt;br /&gt;
 rc-update add zoneminder default&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Pboin</name></author>
	</entry>
</feed>