Anyone got ZoneMinder working on CentOS 7?

Forum for questions and support relating to the 1.28.x releases only.
User avatar
knight-of-ni
Posts: 2368
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Anyone got ZoneMinder working on CentOS 7?

Post by knight-of-ni » Mon Nov 10, 2014 4:01 pm

hmmm, that's always fixed it for me.

Try deleting the cmake cache file "CMakeCache.txt" and then rerun cmake.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Re: Anyone got ZoneMinder working on CentOS 7?

Post by philipt » Mon Nov 10, 2014 4:12 pm

Looking better.....
Philip

philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Re: Anyone got ZoneMinder working on CentOS 7?

Post by philipt » Mon Nov 10, 2014 4:17 pm

Great, thanks very much! That fixed the ffmpeg problem. Lots of warnings about deprecated calls but nothing generated an error.

My build fell at the last hurdle; with the perl issue I referred to on my original post. I googles for a solution to this without success yesterday. It looks like a perl parameter may be set wrong on my system?

[100%] Building ZoneMinder perl modules
cd /opt/ZoneMinder-1.27.0/scripts/ZoneMinder && perl Makefile.PL FIRST_MAKEFILE=MakefilePerl PREFIX="/opt/ZoneMinder-1.27.0/scripts/ZoneMinder/output" LIB="/opt/ZoneMinder-1.27.0/scripts/ZoneMinder/output/lib64/perl5" INSTALLSITEMAN3DIR="/opt/ZoneMinder-1.27.0/scripts/ZoneMinder/output/share/man/man3"
Only one of PREFIX or INSTALL_BASE can be given. Not both.
make[2]: *** [scripts/ZoneMinder/CMakeFiles/zmperlmodules] Error 255
make[2]: Leaving directory `/opt/ZoneMinder-1.27.0'
make[1]: *** [scripts/ZoneMinder/CMakeFiles/zmperlmodules.dir/all] Error 2
make[1]: Leaving directory `/opt/ZoneMinder-1.27.0'
make: *** [all] Error 2
[root@apu ZoneMinder-1.27.0]#
Philip

User avatar
knight-of-ni
Posts: 2368
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Anyone got ZoneMinder working on CentOS 7?

Post by knight-of-ni » Mon Nov 10, 2014 4:33 pm

Yes, I got that one too on CentOS 7. I forget the exact name, but there is a perl-local package that is probably installed on your system.
Having that package installed reconfigures your perl environment to try and install all Perl modules, locally, under your home folder. You definitely do not want that. I don't know why this package gets installed by default.

Removing the package fixes the error.

To find the name of the pacakge do this:

Code: Select all

rpm -qa |grep perl | grep local
UPDATE: Just confirmed that the package you want to make go away is called "perl-local-lib"
Last edited by knight-of-ni on Mon Nov 10, 2014 4:45 pm, edited 1 time in total.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

User avatar
knight-of-ni
Posts: 2368
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Anyone got ZoneMinder working on CentOS 7?

Post by knight-of-ni » Mon Nov 10, 2014 4:36 pm

I just remembered that I do have a handful of zoneminder's dependencies built for centos 7. You can view them here:
http://zmrepo.connortechnology.com/el/7/x86_64/

Note that I have not tested these. I was just messing around to see how easily the packages would build.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Re: Anyone got ZoneMinder working on CentOS 7?

Post by philipt » Mon Nov 10, 2014 5:20 pm

Thank you SO much! I spent hours over the weekend wrestling with this, and I would never have found those issues myself. It's now built and installed. I have a little metal-bashing to do before I power up the video card but that's familiar territory for me and hopefully I will have that sorted within the next day or two. Then my version 1.25 platform on CentOS 6 can be replaced with 1.27 on CentOS 7 and low-power hardware, all solid state.

It's great to see excellent support is back for ZoneMinder - thanks again!
Philip

chrisn0123
Posts: 28
Joined: Sun Feb 16, 2014 3:10 pm

Re: Anyone got ZoneMinder working on CentOS 7?

Post by chrisn0123 » Wed Nov 12, 2014 10:08 am

How did you guys get the zoneminder service to work? I'm stuck at that point now! Everything compiled ok.

If I try to run zmpkg.pl manually I get this error:

[root@zm-test ZoneMinder]# /usr/bin/zmpkg.pl start
Warning, overriding installed ./zm.conf file with local copy
Failed to issue method call: Unit zoneminder.service failed to load: No such file or directory.

Found a zoneminder.service file and modified it for mariadb instead of mysqld, but still no joy with it.

Cheers!

User avatar
knight-of-ni
Posts: 2368
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Anyone got ZoneMinder working on CentOS 7?

Post by knight-of-ni » Wed Nov 12, 2014 4:12 pm

When controlling zoneminder from the command line, this is best practice:

Code: Select all

sudo systemctl start zoneminder
Trying to call zmpkg.pl directly just auto-redirects through systemd anyway.

Once you have a properly configured zoneminder service file copied to the folder /var/lib/systemd/system/ , you must tell systemd you made a change by issuing:

Code: Select all

sudo systemctl daemon-reload
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

chrisn0123
Posts: 28
Joined: Sun Feb 16, 2014 3:10 pm

Re: Anyone got ZoneMinder working on CentOS 7?

Post by chrisn0123 » Thu Nov 13, 2014 8:17 am

Cheers for that knnniggett!

I originally was putting the service file in /etc/init.d by mistake.. found /var/lib/systemd/system/ in the end.

The only problem now is getting a working systemd service file for CentOS 7. The ones I've tried fail constantly. I changed
mysqld.service to mariadb.service etc.. but none I find seem to work. Does anyone have a working systemd service file
for CentOS 7? Pleaseee? :)

User avatar
knight-of-ni
Posts: 2368
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Anyone got ZoneMinder working on CentOS 7?

Post by knight-of-ni » Thu Nov 13, 2014 1:17 pm

chrisn0123 wrote:Cheers for that knnniggett!
The only problem now is getting a working systemd service file for CentOS 7. The ones I've tried fail constantly. I changed
mysqld.service to mariadb.service etc.. but none I find seem to work. Does anyone have a working systemd service file
for CentOS 7? Pleaseee? :)
The one you should be using is sitting under the /misc subfolder of your build folder.
You need to define what "doesn't work" means if you are having trouble with it.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

chrisn0123
Posts: 28
Joined: Sun Feb 16, 2014 3:10 pm

Re: Anyone got ZoneMinder working on CentOS 7?

Post by chrisn0123 » Thu Nov 13, 2014 1:40 pm

Doh' thanks for that!!

Used the /misc zoneminder.service, changed mysqld to mariadb and that one has worked absolutely fine!

I previously used another one that was posted on these forums for CentOS 7 and 1.27.x

Thanks loads, all working! :)

Loneship
Posts: 1
Joined: Fri Nov 28, 2014 9:45 am

Re: Anyone got ZoneMinder working on CentOS 7?

Post by Loneship » Fri Nov 28, 2014 10:19 am

Hello to everyone,

i´m not new to Zoneminder (had 1.25 running on Centos 5.10 X64).
Due to change of Hardware i decided to use Centos 7 x64 and am stuck compiling the zoneminder source.
Cmake finishes without any errors.
Executing make gives the following errors:

[ 36%] Building CXX object src/CMakeFiles/zm.dir/zm_local_camera.cpp.o
cd /software/Linux/zoneminder/ZoneMinder-1.28.0/src && /bin/c++ -Wall -D__STDC_CONSTANT_MACROS -O2 -I/software/Linux/zoneminder/ZoneMinder-1.28.0/src -I/software/Linux/zoneminder/ZoneMinder-1.28.0 -o CMakeFiles/zm.dir/zm_local_camera.cpp.o -c /software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.cpp
In file included from /software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.cpp:24:0:
/software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.h:68:9: error: âvideo_mbufâ does not name a type
video_mbuf frames;
^
/software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.h:69:9: error: âvideo_mmapâ does not name a type
video_mmap *buffers;
^
/software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.cpp: In function âAVPixelFormat getFfPixFormatFromV4lPalette(int, int)â:
/software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.cpp:185:18: error: âVIDEO_PALETTE_RGB32â was not declared in this scope
case VIDEO_PALETTE_RGB32 :
^
/software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.cpp:191:18: error: âVIDEO_PALETTE_RGB24â was not declared in this scope
case VIDEO_PALETTE_RGB24 :
^
/software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.cpp:197:18: error: âVIDEO_PALETTE_GREYâ was not declared in this scope
case VIDEO_PALETTE_GREY :
^
/software/Linux/zoneminder/ZoneMinder-1.28.0/src/zm_local_camera.cpp:200:18: error: âVIDEO_PALETTE_RGB555â was not declared in this scope[/size][/size][/size][/size]

There are much more of this.
ffmpeg is installed from nux-Repository and showing as "all ok".
All other hints found in this Thread are done.

Hope you can help find a solution. Anything with v4l maybe?

Thanks in advance!
Thomas

clipo
Posts: 82
Joined: Sat Sep 06, 2008 9:55 am
Location: Manchester, UK
Contact:

Re: Anyone got ZoneMinder working on CentOS 7?

Post by clipo » Sun Feb 01, 2015 11:18 am

OK, So I have built and installed Zoneminder 1.28 and fall over at the last hurdel Systemd....

I get the following messge upon starting ZM

zoneminder.service - ZoneMinder CCTV recording and security system
Loaded: loaded (/usr/lib/systemd/system/zoneminder.service; enabled)
Active: failed (Result: exit-code) since Sun 2015-02-01 11:06:43 GMT; 16s ago
Process: 6274 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)

Feb 01 11:06:42 localhost.localdomain systemd[1]: Starting ZoneMinder CCTV recording and security system...
Feb 01 11:06:42 localhost.localdomain zmpkg[6274]: INF [Command: start]
Feb 01 11:06:43 localhost.localdomain zmpkg[6274]: FAT [Can't create missing temporary directory '/var/run/zm': Permission denied]
Feb 01 11:06:43 localhost.localdomain systemd[1]: zoneminder.service: control process exited, code=exited status=255
Feb 01 11:06:43 localhost.localdomain systemd[1]: Failed to start ZoneMinder CCTV recording and security system.
Feb 01 11:06:43 localhost.localdomain systemd[1]: Unit zoneminder.service entered failed state.


I manually make a /var/run/zm directory and then try again and end up with this error

zoneminder.service - ZoneMinder CCTV recording and security system
Loaded: loaded (/usr/lib/systemd/system/zoneminder.service; enabled)
Active: failed (Result: exit-code) since Sun 2015-02-01 11:08:42 GMT; 10s ago
Process: 6319 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)

Feb 01 11:08:31 localhost.localdomain systemd[1]: Starting ZoneMinder CCTV recording and security system...
Feb 01 11:08:31 localhost.localdomain zmpkg[6319]: INF [Command: start]
Feb 01 11:08:32 localhost.localdomain zmdc[6332]: INF [Server starting at 15/02/01 11:08:32]
Feb 01 11:08:34 localhost.localdomain zmdc[6332]: FAT [Can't bind: Permission denied]
Feb 01 11:08:42 localhost.localdomain zmdc[6329]: FAT [Can't connect: No such file or directory]
Feb 01 11:08:42 localhost.localdomain zmpkg[6319]: ERR [Unable to run "/usr/bin/zmdc.pl startup", output is "Starting server"]
Feb 01 11:08:42 localhost.localdomain systemd[1]: zoneminder.service: control process exited, code=exited status=255
Feb 01 11:08:42 localhost.localdomain systemd[1]: Failed to start ZoneMinder CCTV recording and security system.
Feb 01 11:08:42 localhost.localdomain systemd[1]: Unit zoneminder.service entered failed state.


Any suggesgions as to my mistake.

User avatar
knight-of-ni
Posts: 2368
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Anyone got ZoneMinder working on CentOS 7?

Post by knight-of-ni » Sun Feb 01, 2015 1:53 pm

You skipped the parts of this thread that describe how to set up tmpfiles.d
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

tcake
Posts: 2
Joined: Sat Jan 31, 2015 10:46 pm

Re: Anyone got ZoneMinder working on CentOS 7?

Post by tcake » Tue Feb 03, 2015 1:56 am

For me the systemclt seems happy with the /etc/systemd/system/zoneminder.service file, but fails running zmpkg.pl.

Where are the perl files being installed on your Centos 7 systems? I built from source using the bootsrap.sh, configure, make, make install sequence.
My base install is going under /root/perl5. It fails when I try to run zmpkg.pl with the error that it can't find ZoneMinder.pm.
If I change the protection on /root from drwxr-x--- to drwxr-x--x it can find ZoneMinder.

I have been trying to change where the perl files get installed into a directory that is not root only protected, but so far I am lost trying to understand the bootsrap.sh / configure scripts.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest