Difference between revisions of "Ubuntu Server 18.04 64-bit with Zoneminder 1.30.4 the easy way"

From ZoneMinder Wiki
Jump to navigationJump to search
Line 47: Line 47:




if needed you can get the file from Onedrive https://1drv.ms/u/s!ApMZyp0q7cregdRym0MrU9BeMP_JUQ or Google Drive https://drive.google.com/open?id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX  
Note: If needed you can get the file from Onedrive https://1drv.ms/u/s!ApMZyp0q7cregdRym0MrU9BeMP_JUQ or Google Drive https://drive.google.com/open?id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX  
 


Install Zoneminder
Install Zoneminder

Revision as of 19:53, 22 March 2018

Ubuntu 18.04 with Zoneminder 1.30.4 Preliminary Install Procedure

Notice: 22MAR18 - Zoneminder has been removed from the Ubuntu 18.04, Bionic, repository. PHP updates to version 7.2 also caused some problems which have been resolved (I hope!). This procedure uses a patched install from Zesty along with cakephp and crud updates to work with PHP7.2

Warning!!! This is a preliminary procedure and changes to the nightly build may cause problems.

Ubuntu 18.04 Bionic Server Nightly Build (22MAR18) installed with LAMP and OpenSSH Server

To better manage the MySQL server I recommend you copy the sample config file and replace the default my.cnf symbolic link.

This removes the current symbolic link

rm /etc/mysql/my.cnf  

This moves the MYSQL Configuration file

cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf

To change MySQL settings:

nano /etc/mysql/my.cnf

In the [mysqld] section add the following

sql_mode = NO_ENGINE_SUBSTITUTION

Note: if you are installing on an existing database server you can use the folowing as an alternate (Thanks to "bodom" for this alternate):

init_connect = 'SET @@sql_mode = CASE CURRENT_USER() WHEN \'zmuser@localhost\' THEN \'NO_ENGINE_SUBSTITUTION\' ELSE @@sql_mode END;'

Ctrl+o Enter to save

CTRL+x to exit

Restart MySQL

systemctl restart mysql

Secure MySQL and set root password (Password not set in nightly build). Do not install the password validation plugin as the default Zoneminder password is not strong.

mysql_secure_installation

Dowmload the Zoneminder install package:

wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX' -O zoneminder-1.30.4-bionic-amd64.deb


Note: If needed you can get the file from Onedrive https://1drv.ms/u/s!ApMZyp0q7cregdRym0MrU9BeMP_JUQ or Google Drive https://drive.google.com/open?id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX


Install Zoneminder

apt install /home/(user)/ zoneminder-1.30.4-bionic-amd64.deb

Enable Zoneminder service to start at boot

systemctl enable zoneminder.service

Add www-data to the sudo group (to enable use of local video devices)

adduser www-data video

Start Zoneminder

systemctl start zoneminder.service

Enable CGI and Zoneminder configuration in Apache.

a2enmod cgi
a2enmod rewrite
a2enconf zoneminder

Add timezone to PHP

nano /etc/php/7.2/apache2/php.ini

Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone. Be sure to remove the ; before date.timezone

[Date]

Defines the default timezone used by the date functions
http://php.net/date.timezone

date.timezone = America/New_York

Ctrl+o Enter to save

CTRL+x to exit

Change permissions in /usr/share/zoneminder/

chown -R www-data:www-data /usr/share/zoneminder/


Restart Apache

service apache2 restart

Open Zoneminder in a web browser (http://server-ip/zm).