<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Blootac</id>
	<title>ZoneMinder Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Blootac"/>
	<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/Special:Contributions/Blootac"/>
	<updated>2026-04-20T01:53:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Raspbian&amp;diff=14333</id>
		<title>Raspbian</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Raspbian&amp;diff=14333"/>
		<updated>2017-02-11T09:19:02Z</updated>

		<summary type="html">&lt;p&gt;Blootac: Updating with missing required step to set PHPs default timezone&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;How to install ZoneMinder on Raspberry PI 1 or 2 with Raspbian 8.1 (Jessy) 64 bit&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A special Thanks to &amp;quot;Felixr&amp;quot; and &amp;quot;BBunge&amp;quot; from which I took the initial FAQ.&lt;br /&gt;
&lt;br /&gt;
Prereq before starting:&lt;br /&gt;
* SD card created with raspbian Jessie 64bit&lt;br /&gt;
* filesystem is extended.&lt;br /&gt;
* the systems boots in console mode with autologin disabled (X is disabled)&lt;br /&gt;
&lt;br /&gt;
Log in as pi&lt;br /&gt;
&lt;br /&gt;
 pi  (followed by your root password)&lt;br /&gt;
&lt;br /&gt;
sudo to root&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
&lt;br /&gt;
Configure your network and Set static IP address&lt;br /&gt;
&lt;br /&gt;
  nano /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
Make changes similar to this:&lt;br /&gt;
&lt;br /&gt;
 auto eth0&lt;br /&gt;
  &lt;br /&gt;
 #allow-hotplug eth0 (make sure this is commented or you will get 2 ip&amp;#039;s)&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
   address 192.168.1.10&lt;br /&gt;
   netmask 255.255.255.0&lt;br /&gt;
   gateway 192.168.1.1&lt;br /&gt;
   dns-nameservers 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
Update Raspbian Sources&lt;br /&gt;
&lt;br /&gt;
 apt-get update&lt;br /&gt;
&lt;br /&gt;
Check to be sure everything is up to date for the raspbian distribution&lt;br /&gt;
&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
 apt-get dist-upgrade&lt;br /&gt;
&lt;br /&gt;
Add the Debian Jessie backports&lt;br /&gt;
&lt;br /&gt;
 nano /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
add to the top of the list:&lt;br /&gt;
&lt;br /&gt;
 deb http://http.debian.net/debian jessie-backports main&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
CTRL+x to exit&lt;br /&gt;
&lt;br /&gt;
add priority to this repository&lt;br /&gt;
&lt;br /&gt;
 nano /etc/apt/preferences.d/zoneminder&lt;br /&gt;
&lt;br /&gt;
add to the file:&lt;br /&gt;
&lt;br /&gt;
 Package: *&lt;br /&gt;
 Pin: origin http.debian.net&lt;br /&gt;
 Pin-Priority: 1100&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
CTRL+x to exit&lt;br /&gt;
&lt;br /&gt;
Update Sources&lt;br /&gt;
&lt;br /&gt;
 apt-get update&lt;br /&gt;
&lt;br /&gt;
you will get a GPG error message like this:&lt;br /&gt;
 W: GPG error: http://http.debian.net jessie-backports InRelease: The following signatures couldn&amp;#039;t be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553    NO_PUBKEY 7638D0442B90D010&lt;br /&gt;
&lt;br /&gt;
Fix this as following:&lt;br /&gt;
 gpg --keyserver pgpkeys.mit.edu --recv-key  8B48AD6246925553&lt;br /&gt;
 gpg -a --export 8B48AD6246925553 | sudo apt-key add -&lt;br /&gt;
 gpg --keyserver pgpkeys.mit.edu --recv-key  7638D0442B90D010&lt;br /&gt;
 gpg -a --export 7638D0442B90D010 | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Update Sources again (now should go fine)&lt;br /&gt;
&lt;br /&gt;
 apt-get update&lt;br /&gt;
&lt;br /&gt;
Package &amp;#039;tar&amp;#039; (tar (1.29b-1~bpo8+1)) seems to be broken.&lt;br /&gt;
exclude tar from upgrade&lt;br /&gt;
 aptitude hold tar&lt;br /&gt;
&lt;br /&gt;
Check to be sure everything is up to date for the raspbian distribution&lt;br /&gt;
&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
 apt-get dist-upgrade&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install  PHP, and MySQL server (This installs MySQL server 5.5. If you want to use MySQL 5.6 follow the instructions [[Install MySQL 5.6 on Debian Jessie]] (using mariadb also works fine, as tested on Debian 8.2, replacement package for mysql-server is then mariadb-server)&lt;br /&gt;
&lt;br /&gt;
 apt-get install  php5 mysql-server php-pear php5-mysql&lt;br /&gt;
&lt;br /&gt;
Install Zoneminder&lt;br /&gt;
&lt;br /&gt;
 apt-get install zoneminder&lt;br /&gt;
&lt;br /&gt;
You may need to install &amp;quot;extra&amp;quot; VLC components (I will check this and edit as needed)&lt;br /&gt;
&lt;br /&gt;
 apt-get install libvlc-dev libvlccore-dev vlc&lt;br /&gt;
&lt;br /&gt;
Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)&lt;br /&gt;
&lt;br /&gt;
This next step creates a file which contained the MySQL user and password. Otherwise you will have to enter the user and password on the command line which is not secure!&lt;br /&gt;
&lt;br /&gt;
Go to the root directory&lt;br /&gt;
 &lt;br /&gt;
 cd ~&lt;br /&gt;
&lt;br /&gt;
Create a hidden password file&lt;br /&gt;
&lt;br /&gt;
 nano .my.cnf&lt;br /&gt;
&lt;br /&gt;
Enter this content (but use your MySQL root password!)&lt;br /&gt;
&lt;br /&gt;
 [client]&lt;br /&gt;
 user=root&lt;br /&gt;
 password=(mysqlpass)&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit&lt;br /&gt;
&lt;br /&gt;
Create database (press ENTER after each command)&lt;br /&gt;
&lt;br /&gt;
 mysql &amp;lt; /usr/share/zoneminder/db/zm_create.sql &lt;br /&gt;
&lt;br /&gt;
 mysql -e &amp;quot;grant select,insert,update,delete,create on zm.* to &amp;#039;zmuser&amp;#039;@localhost identified by &amp;#039;zmpass&amp;#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Remove password file&lt;br /&gt;
&lt;br /&gt;
 rm .my.cnf&lt;br /&gt;
&lt;br /&gt;
Set permissions of /etc/zm/zm.conf to root:www-data 740&lt;br /&gt;
&lt;br /&gt;
 chmod 740 /etc/zm/zm.conf&lt;br /&gt;
 &lt;br /&gt;
 chown root:www-data /etc/zm/zm.conf&lt;br /&gt;
&lt;br /&gt;
create link for apache (paths can differ)&lt;br /&gt;
 ln -s /etc/zm/apache.conf /etc/apache2/conf-enabled/zoneminder.conf&lt;br /&gt;
&lt;br /&gt;
Enable Zoneminder service to start at boot&lt;br /&gt;
&lt;br /&gt;
 systemctl enable zoneminder.service&lt;br /&gt;
&lt;br /&gt;
Add www-data to the sudo group (to enable use of local video devices)&lt;br /&gt;
&lt;br /&gt;
 adduser www-data video&lt;br /&gt;
&lt;br /&gt;
Start Zoneminder&lt;br /&gt;
&lt;br /&gt;
 systemctl start zoneminder.service&lt;br /&gt;
&lt;br /&gt;
Check to see that Zoneminder is running&lt;br /&gt;
&lt;br /&gt;
 systemctl status zoneminder.service&lt;br /&gt;
&lt;br /&gt;
Enable CGI and Zoneminder configuration in Apache.&lt;br /&gt;
 &lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
 &lt;br /&gt;
 a2enconf zoneminder&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
*** You may be tempted to try Zoneminder at this point but there is one setting you will need to change from the web gui.  Read on!!!&lt;br /&gt;
&lt;br /&gt;
Optional: Install Cambozola (needed if you use Internet Explorer)&lt;br /&gt;
&lt;br /&gt;
 cd /usr/src &amp;amp;&amp;amp; wget http://www.andywilcock.com/code/cambozola/cambozola-latest.tar.gz&lt;br /&gt;
&lt;br /&gt;
 tar -xzvf cambozola-latest.tar.gz&lt;br /&gt;
&lt;br /&gt;
 replace 936 with cambozola version downloaded&lt;br /&gt;
&lt;br /&gt;
 cp cambozola-0.936/dist/cambozola.jar /usr/share/zoneminder&lt;br /&gt;
&lt;br /&gt;
Kernel shared memory settings:&lt;br /&gt;
&lt;br /&gt;
Set shared memory for 512MB RPi board:&lt;br /&gt;
1) 128MB shhmax shared:&lt;br /&gt;
  sudo su -&lt;br /&gt;
  echo &amp;quot;kernel.shmmax = 134217728&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
2) 2MB shmall pages:&lt;br /&gt;
 sudo su -&lt;br /&gt;
 echo &amp;quot;kernel.shmall = 2097152&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Set PHPs Default Timezone&lt;br /&gt;
 sudo nano /etc/php5/apache2/php.ini&lt;br /&gt;
&lt;br /&gt;
ctrl+w to search, and type &lt;br /&gt;
 date.timezone&lt;br /&gt;
&lt;br /&gt;
Remove the initial &amp;#039;;&amp;#039; and enter your timezone from the list at http://php.net/manual/en/timezones.php&lt;br /&gt;
&lt;br /&gt;
The line should look something like &lt;br /&gt;
 date.timezone = Europe/London&lt;br /&gt;
ctrl + x&lt;br /&gt;
&lt;br /&gt;
&amp;#039;y&amp;#039; to save and exit&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
You should now be able to access the web server using http://servername&lt;br /&gt;
&lt;br /&gt;
Open Zoneminder in web browser&lt;br /&gt;
&lt;br /&gt;
 http://serverip/zm&lt;br /&gt;
&lt;br /&gt;
Click Options&lt;br /&gt;
&lt;br /&gt;
Uncheck: Check with zoneminder.com for updated versions (?) click Save&lt;br /&gt;
&lt;br /&gt;
Click Images tab&lt;br /&gt;
&lt;br /&gt;
Check Is the (optional) cambozola java streaming client installed (?) Click Save&lt;br /&gt;
&lt;br /&gt;
Click Paths&lt;br /&gt;
&lt;br /&gt;
Change PATH_ZMS from /cgi-bin/nph-zms to /zm/cgi-bin/nph-zms       Click Save&lt;br /&gt;
&lt;br /&gt;
Optional: under Paths change PATH_SWAP to /dev/shm (puts this process in RAM drive)   Click Save&lt;br /&gt;
&lt;br /&gt;
Restart Zoneminder&lt;br /&gt;
&lt;br /&gt;
Your Zoneminder install is now ready to add cameras!&lt;/div&gt;</summary>
		<author><name>Blootac</name></author>
	</entry>
</feed>