Page 1 of 1

New installation on Ubuntu 16.04LTS - can't start

Posted: Sat Apr 01, 2017 11:28 am
by danensis
I've been running ZM under the old Mandrake system for years, with no trouble, but have bought some new hardware, and done a fresh install of Ubuntu 16.04 LTS Desktop, and added LAMP, the Open SSH server and the iconnor repositories. I then installed ZM using the instructions at https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
Apache seems to load OK, as I get the test screen, but ~/zm gives a 404 error

When I look at Zoneminder status I see:
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2017-04-01 11:17:28 BST; 9min ago
Process: 2860 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
Main PID: 2881 (zmdc.pl)
CGroup: /system.slice/zoneminder.service
├─2881 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
├─2911 /usr/bin/perl -wT /usr/bin/zmfilter.pl
├─2916 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
├─2922 /usr/bin/perl -wT /usr/bin/zmwatch.pl
├─2929 /usr/bin/perl -w /usr/bin/zmupdate.pl -c
└─2934 /usr/bin/perl -w /usr/bin/zmtelemetry.pl

Apr 01 11:17:28 Security zmwatch[2922]: INF [Watchdog pausing for 30 seconds]
Apr 01 11:17:28 Security zmdc[2881]: INF ['zmupdate.pl -c' starting at 17/04/01 11:17:28, pid = 2929]
Apr 01 11:17:28 Security zmdc[2929]: INF ['zmupdate.pl -c' started at 17/04/01 11:17:28]
Apr 01 11:17:28 Security sudo[2923]: pam_unix(sudo:session): session closed for user www-data
Apr 01 11:17:28 Security sudo[2930]: root : TTY=unknown ; PWD=/usr/share/zoneminder/www ; USER=www-data ; COMMAND=/usr/bin/zmdc.pl start z
Apr 01 11:17:28 Security sudo[2930]: pam_unix(sudo:session): session opened for user www-data by (uid=0)
Apr 01 11:17:28 Security zmfilter[2911]: INF [Scanning for events]
Apr 01 11:17:28 Security zmdc[2881]: INF ['zmtelemetry.pl' starting at 17/04/01 11:17:28, pid = 2934]
Apr 01 11:17:28 Security zmdc[2934]: INF ['zmtelemetry.pl' started at 17/04/01 11:17:28]
Apr 01 11:17:28 Security systemd[1]: Started ZoneMinder CCTV recording and surveillance system.


When I tail /var/log/messages I get:
tail: cannot open '/var/log/messages' for reading: No such file or directory
tail: cannot open '/var/log/httpd/error_log' for reading: No such file or directory
tail: cannot open '/var/log/zm/zm*.log' for reading: No such file or directory

Any ideas what's gone wrong?

Re: New installation on Ubuntu 16.04LTS - can't start

Posted: Sat Apr 01, 2017 11:51 am
by bbunge
Those instructions were reviewed and updated for ZM 1.30.2 last night. I recommend you start over with a fresh Ubuntu install and follow the instructions to the letter!

LAMP can be installed using tasksel which will have to be installed on the desktop version of Ubuntu. If you want to install the components use:

apt install apache2 php mariadb-server php-mysql apache2-mod-php7.0

Re: New installation on Ubuntu 16.04LTS - can't start

Posted: Sat Apr 01, 2017 1:19 pm
by bbunge
In doing a setup with Ubuntu 16.10 I had ZM fail to start. I had forgotten to add the setting to MySQL my.cnf. This may be your problem!

nano /etc/mysql/my.cnf

In the [mysqld] section add the following

sql_mode = NO_ENGINE_SUBSTITUTION

Re: New installation on Ubuntu 16.04LTS - can't start

Posted: Sun Apr 02, 2017 8:08 am
by danensis
I reinstalled Ubuntu 16.04LTS Desktop and followed the instructions again, and ZM started this time. Still can't see any images, but that's another problem. Thank you.

Re: New installation on Ubuntu 16.04LTS - can't start

Posted: Sun Apr 02, 2017 12:18 pm
by bbunge
IMPORTANT FINAL STEP: Open Zoneminder in a web browser (http://server-ip/zm). Click on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms