Ubuntu 16.04 Release with Zoneminder 1.29.0

Forum for questions and support relating to the 1.29.x releases only.
bbunge
Posts: 2364
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Thu Apr 21, 2016 1:50 pm

I have verified the "Easy" Zoneminder 1.29.0 install procedure on the released Ubuntu 16.04 LTS!

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Please be aware that you will have to make some configuration changes to Apache and MySQL. These steps are included in the procedure.

I have completed and tested the procedure to upgrade MySQL 5.7 to Mariadb 10. The cleanest way to do this is before installing Zoneminder but there is a procedure to upgrade to Mariadb with Zoneminder (or other databases) installed.

As with all my procedures I try to do them so a Linux novice can get Zoneminder running easily. But you have to follow all of the steps!

Bill
Last edited by bbunge on Thu Apr 21, 2016 7:43 pm, edited 1 time in total.

User avatar
asker
Posts: 1049
Joined: Sun Mar 01, 2015 12:12 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by asker » Thu Apr 21, 2016 2:33 pm

Bill, did you face any issues with MySQL 5.7? Why did you choose to move to Mariadb?
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

bbunge
Posts: 2364
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Thu Apr 21, 2016 3:26 pm

asker wrote:Bill, did you face any issues with MySQL 5.7? Why did you choose to move to Mariadb?
I did have issues with MySQL 5.7 which were overcome by adding sql_mode = NO_ENGINE_SUBSTITUTION to my.cnf. Otherwise MySQL 5.7 works OK.

I chose to include the option to use Mariadb because I could and it provides another option. Centos 7 uses Mariadb. I feel it runs smoother than MySQL.

As of this I recommend switching to Mariadb before installing Zoneminder (new install) as the Zoneminder database will not be copied to the new directory. I will work out procedures to upgrade a running ZM system with Mariadb but it may take me time. There are other important things like a long bike ride before it rains this afternoon!

Stay tuned

Oh Mariadb upgrade procedures have been tested: https://wiki.zoneminder.com/Ubuntu_Serv ... erver_10.0.

hondaman
Posts: 25
Joined: Sat Jun 17, 2006 9:29 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by hondaman » Fri Apr 22, 2016 11:27 pm

I just want to thank you bbunge for writing that. I followed it yesterday to get zm installed. I'm glad I found it, I was trying to use some of the older guides and was getting tripped up by some differences.

bbunge
Posts: 2364
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Fri Apr 22, 2016 11:42 pm

hondaman wrote:I just want to thank you bbunge for writing that. I followed it yesterday to get zm installed. I'm glad I found it, I was trying to use some of the older guides and was getting tripped up by some differences.
Glad it worked for you!

bb

hondaman
Posts: 25
Joined: Sat Jun 17, 2006 9:29 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by hondaman » Fri Apr 22, 2016 11:49 pm

bbunge wrote:
hondaman wrote:I just want to thank you bbunge for writing that. I followed it yesterday to get zm installed. I'm glad I found it, I was trying to use some of the older guides and was getting tripped up by some differences.
Glad it worked for you!

bb
There was one small error. And in full disclosure I didn't follow your advice about " I recommend you move the config file and replace the default my.cnf symbolic link. ", I simply edited my.cnf in place, as it was installed by Ubuntu.

In this portion of the guide:

Code: Select all

Underneath [mysql] add the following

sql_mode = NO_ENGINE_SUBSTITUTION
[mysql] didn't exit, so I had to add it after I loooked around the internet to make sure that was the correct thing to do.

bbunge
Posts: 2364
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Sun Apr 24, 2016 1:58 am

Actually, what you think is an error isn't. It is just another way of skinning the cat.
If you follow the symbolic links, two of them in the default LAMP install, you get back to /etc/mysql/mysql.cnf which is a pretty basic config file that relies on the MySQL 5.7 default settings. That, in a nutshell, is why I recommend replacing the first /etc/mysql/my.cnf symbolic link with a real configuration file. If you run Zoneminder long enough with lots of events, you will have to tune the MySQL, or Mariadb, settings.

bb

borism
Posts: 2
Joined: Mon Apr 25, 2016 1:11 am

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by borism » Mon Apr 25, 2016 1:25 am

Hi
Ubuntu 16.04 MySql Server 5.7.11-0ubuntu6 PHP7.0

The (sql_mode = NO_ENGINE_SUBSTITUTION) does not work - ERROR!!!!

Code: Select all

root@orion-15:~# mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql: [ERROR] unknown variable 'sql_mode=NO_ENGINE_SUBSTITUTION'
my.cnf (link - /etc/mysql/mysql.conf.d/mysqld.cnf)

Code: Select all

/etc/mysql/my.cnf                                     808/3241               24%
#
# The MySQL database server configuration file.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
lc-messages-dir	= /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address		= 127.0.0.1
#
# * Fine Tuning
#
key_buffer_size		= 16M
max_allowed_packet	= 16M
thread_stack		= 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options  = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit	= 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries	= /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
#log_bin			= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size   = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

# dop my minimum mem
skip-name-resolve
skip-federated

# dop kodirovka
skip-character-set-client-handshake
character-set-server = utf8
collation-server = utf8_unicode_ci
[mysql]
sql_mode = NO_ENGINE_SUBSTITUTION

what should I do

hondaman
Posts: 25
Joined: Sat Jun 17, 2006 9:29 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by hondaman » Mon Apr 25, 2016 2:45 am

My /etc/mysql/my.cnf looks like this in its entirety http://pastebin.com/KWhpqwgx
I manually added these two lines:

Code: Select all

[mysqld]
sql_mode = NO_ENGINE_SUBSTITUTION
borism wrote:Hi
Ubuntu 16.04 MySql Server 5.7.11-0ubuntu6 PHP7.0

The (sql_mode = NO_ENGINE_SUBSTITUTION) does not work - ERROR!!!!

Code: Select all

root@orion-15:~# mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql: [ERROR] unknown variable 'sql_mode=NO_ENGINE_SUBSTITUTION'
my.cnf (link - /etc/mysql/mysql.conf.d/mysqld.cnf)

Code: Select all

/etc/mysql/my.cnf                                     808/3241               24%
#
# The MySQL database server configuration file.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
lc-messages-dir	= /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address		= 127.0.0.1
#
# * Fine Tuning
#
key_buffer_size		= 16M
max_allowed_packet	= 16M
thread_stack		= 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options  = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit	= 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries	= /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
#log_bin			= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size   = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

# dop my minimum mem
skip-name-resolve
skip-federated

# dop kodirovka
skip-character-set-client-handshake
character-set-server = utf8
collation-server = utf8_unicode_ci
[mysql]
sql_mode = NO_ENGINE_SUBSTITUTION

what should I do

bbunge
Posts: 2364
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Mon Apr 25, 2016 2:51 am

When all else fails, read and follow the instructions!

hondaman
Posts: 25
Joined: Sat Jun 17, 2006 9:29 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by hondaman » Mon Apr 25, 2016 3:02 am

I just took a closer look at the instructions you wrote (that I skipped), and I did in fact just now find an error. 8)

Code: Select all

cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
That isn't a valid path. It should read:

Code: Select all

cp /etc/mysql/conf.d/mysql.cnf /etc/mysql/my.cnf
bbunge wrote:When all else fails, read and follow the instructions!

SteveGilvarry
Posts: 418
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by SteveGilvarry » Mon Apr 25, 2016 4:37 am

Interesting /etc/mysql/mysql.conf.d/mysqld.cnf is correct on my Mysql in 16.04. I believe the prefix was added to allow mariadb and mysql configuration to be kept separate. My /etc/mysql/conf.d/mysql.cnf is essentially empty.
Production Zoneminder 1.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

hondaman
Posts: 25
Joined: Sat Jun 17, 2006 9:29 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by hondaman » Mon Apr 25, 2016 4:54 am

Oh gosh. I'm probably 0-2 now and should probably quit trying to break stuff that aint broke.

bbunge
Posts: 2364
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Mon Apr 25, 2016 1:06 pm

hondaman wrote:Oh gosh. I'm probably 0-2 now and should probably quit trying to break stuff that aint broke.
That's OK. As I'm a hunt and peck typer I do make mistakes so it is good for someone to double check me! Spell check does not do well with code entries. :wink:

philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by philip_d » Mon Apr 25, 2016 1:23 pm

Hi, Everyone,

Is there anybody that can help me regarding 1.29 version.Below is the error when I connect on the browser. I changed already the timezone but still the same.I'm using Unbuntu LTS16.04 Server

ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest