To Change MySQL Settings
To Change MySQL Settings
To Change MySQL Settings
nano /etc/mysql/my.cnf
sql_mode = NO_ENGINE_SUBSTITUTION
CTRL+x to exit
Restart MySQL
a2enconf zoneminder
a2enmod cgi
a2enmod rewrite
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"
}
sudo -i
add-apt-repository ppa:iconnor/zoneminder
apt-get update
apt-get install zoneminder
Step 3: Set up DB
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
(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 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
Ctrl+o Enter to save
CTRL+x to exit
Restart MySQL
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.
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:
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
Start Zoneminder