Académique Documents
Professionnel Documents
Culture Documents
a2enconf zoneminder
a2enmod cgi
a2enmod rewrite
nano /etc/php/7.0/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and change date.timezone
for your time zone, see [this](http://php.net/manual/en/timezones.php). Don’t forget to
remove the ; from in front of date.timezone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
CTRL+x to exit
Step 10: Reload Apache service
If it is working correctly you should get version information similar to the example
below:
{
"version": "1.29.0",
"apiversion": "1.29.0.1"
}
Step 1: Either run commands in this install using sudo or use the below to become root
sudo -i
add-apt-repository ppa:iconnor/zoneminder
apt-get update
apt-get install zoneminder
Step 3: Set up DB
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.*
to 'zmuser'@localhost identified by 'zmpass';"
a2enconf zoneminder
a2enmod rewrite
a2enmod cgi
nano /etc/php5/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and change date.timezone
for your time zone, see [this](http://php.net/manual/en/timezones.php). Don’t forget to
remove the ; from in front of date.timezone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
CTRL+x to exit
If it is working correctly you should get version information similar to the example
below:
{
"version": "1.29.0",
"apiversion": "1.29.0.1"
}
wget https://raw.githubusercontent.com/ZoneMinder/ZoneMinder/master/utils/do_debian_package.sh
chmod a+x do_debian_package.sh
Note that the lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}' part simply
extracts your distribution name - like “vivid”, “trusty” etc. You can always replace it by
your distro name if you know it. As far as the script goes, it checks if your distro is
“trusty” in which case it pulls in pre-systemd release configurations and if its not “trusty”
it assumes its based on systemd and pulls in systemd related config files.
(At the end the script will ask if you want to retain the checked out version of
ZoneMinder. If you are a developer and are making local changes, make sure you
select “y” so that the next time you do the build process mentioned here, it keeps your
changes. Selecting any other value than “y” or “Y” will delete the checked out code and
only retain the package)
This should now create a bunch of .deb files
This will report DB errors - ignore - you need to configure the DB and some other
stuff
Now that you have installed from your own package you can resume following the
standard install guide for your version, start at the step after Install Zoneminder.
Hints
Make sure ZoneMinder and APIs work with security
After you have setup your camera make sure you can view Monitor streams, if not
check some of the common causes:
If you have changed your DB login/password from zmuser/zmpass, you need to update
these values in zm.conf and the API’s database.php file.
1. Edit zm.conf to change ZM_DB_USER and ZM_DB_PASS to the values you used.
2. Edit databse.php which can be found in the web server folder
zoneminder/www/api/app/Config
There is a class there called DATABASE_CONFIG - change the $default array to reflect
your new details. Example:
Next Previous
mysql_secure_installation
Optional: A tool that you may want to install is mysqltuner. This is handy to see what database parameters
need to be adjusted as your ZM system builds up events.
apt-get install mysqltuner
Once installed, run mysqltuner from a command prompt as root (sudo). Review recommended changes. Edit
the configuration file (my.cnf) and make the recommended changes. Stop zoneminder, restart the database
server then start zoneminder.
Install Zoneminder
Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions
in MySQL)
a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
Fix Permissions
Edit zoneminder.conf
nano /etc/apache2/conf-available/zoneminder.conf
<Directory /usr/share/zoneminder/www>
Options -Indexes +FollowSymLinks
<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>
nano /etc/php/7.0/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone.
Make sure to remove the ; from the front of date.timezone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
mysql_secure_installation
nano /etc/mysql/my.cnf
Here is a link to manually install LAMP with Mariadb server Install MariaDB Server 10.0
Optional Upgrade to MariaDB Server 10.0. with Zoneminder (or other databases)
installed
Note: This procedure is concerned with backing up and recreating the Zoneminder database. You can use the
same commands, with other database names, if your system has other databases running in MySQL.
Stop Zoneminder
Upgrade the LAMP installed MySQL 5.7 to Mariadb with the command:
apt-get install mariadb-server
mysql_secure_installation
rm /etc/mysql/my.cnf
cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/my.cnf
nano /etc/mysql/my.cnf
mysql -uroot -p
\q
Set permissions
mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by
'zmpass';"
Start Zoneminder