Support #589
Updated by Daniel Curtis over 9 years ago
This is a guide for setting up ZoneMinder on FreeBSD 9.3.
*NOTE*: Zoneminder will not work in a jail because it required the use of shared memory. If you still want to install zoneminder in a jail you can enable shared memory in jails by enabling, which can be found "here":http://stackoverflow.com/questions/11909993/freebsd-jail-can-not-set-security-jail-sysvipc-allowed
h1. Setting up the Environment
* Start by making sure everything is up to date:
<pre>
pkg update && pkg upgrade
portsnap fetch extract
</pre>
* Install portmaster:
<pre>
cd /usr/ports/ports-mgmt/portmaster
make install clean
pkg2ng
</pre>
h1. Install MySQL
* Install MySQL server and client:
<pre>
portmaster databases/mysql56-server databases/mysql56-client
</pre>
* Start and enable MySQL at boot:
<pre>
echo 'mysql_enable="YES"' >> /etc/rc.conf
service mysql-server start
</pre>
* Secure your installation:
<pre>
mysql_secure_installation
</pre>
h1. Install ZoneMinder
* Install ZoneMinder:
<pre>
portmaster multimedia/zoneminder
</pre>
* Log into the MySQL server:
<pre>
mysql -u root -p
</pre>
#* And setup the ZoneMinder database:
<pre>
source /usr/local/share/doc/zoneminder/zm_create.sql
</pre>
#* Now setup a user for the ZoneMinder database:
<pre>
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'SuperSecretPassword'; flush privileges;
quit
</pre>
* Start and enable ZoneMinder at boot:
<pre>
echo 'zoneminder_enable="YES"' >> /etc/rc.conf
service zoneminder start
</pre>