View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 9 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Zoneminder and R7.4
PostPosted: Mon Sep 03, 2012 6:27 pm 
Offline
Joined: Wed Jan 18, 2006 8:36 pm
Posts: 199
Just did a fresh install from ISO and it appears zoneminder is already installed.

Adjust kernel shared memory buffers:
Code:
echo kernel.shmall = 134217728 | sudo tee -a /etc/sysctl.conf

Code:
echo kernel.shmmax = 134217728 | sudo tee -a /etc/sysctl.conf

and then
Code:
sudo /sbin/sysctl -p /etc/sysctl.conf

to make settings take effect

Fix the zm.conf so you can initialize the database:
Code:
echo ZM_PATH_UPDATE=/usr/lib/zm/upgrade | sudo tee -a /etc/zm.conf


Initialize database:
Code:
sudo /usr/lib/zm/bin/zminit


I was given the option to Update my database, but this did not appear to work. Instead I chose to drop the old database and reinitialize.

Code:
sudoedit /etc/lighttpd/conf.include

Quote:
alias.url = (
"/cgi-zm" => "/srv/zoneminder/cgi-bin/",
"/zm" => "/srv/zoneminder/www/"
)
$HTTP["url"] =~ "^/cgi-zm" {
cgi.assign = ( "" => "" )
}


restart lighttpd
Code:
sudo killall lighttpd


Fix log permissions
Code:
sudo mkdir /var/log/zm
sudo chown -R http:http /var/log/zm


Fix data directory permissions
Code:
sudo chown -R http:http /var/lib/zm


Have zm run at boot-up
Code:
sudo add_service.sh zm


Fix system start-up script to use correct path:
Code:
sudoedit /etc/rc.d/zm

and change
Quote:
ZM_PATH_BIN="/usr/lib/zm/bin"

to
Code:
ZM_PATH_BIN="/srv/zoneminder/bin"


[quote]
Use you favorite web browser to configure zoneminder.

First draft: 2012-Sep-4


Last edited by bobmyth on Mon Sep 03, 2012 9:04 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Mon Sep 03, 2012 7:32 pm 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
Nice one bobmyth. Perhaps you would like to add this to the wiki?

Probably best so others can add to it and build on what you have done.


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Mon Sep 03, 2012 9:06 pm 
Offline
Joined: Wed Jan 18, 2006 8:36 pm
Posts: 199
christ wrote:
Nice one bobmyth. Perhaps you would like to add this to the wiki?


I'm currently not versed in the wiki mark-up language. If I get some time I will try to educate myself and transfer this to the wiki.


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Tue Sep 04, 2012 6:11 am 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
Don't worry. The mark up language is actually quite simple and you can literally steal examples from the other entries to use as a template for yours.

While it is fantastic that you took the effort to contribute this to the community, putting it in the wiki makes it easier to maintain over time. I hope you can find the time. I certainly understand time constraints; as you may have noticed I disappear frequently too and then mysteriously pop in!


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Thu Oct 04, 2012 2:08 pm 
Offline
Joined: Sun Mar 26, 2006 5:30 pm
Posts: 10
This is great stuff bobmyth! Thanks for posting it. I've tried getting zm working with previous versions of linhes but my linux skills aren't great and I never got it working. This week I did a clean install of 7.4 and thought I'd try it again. Following your instructions, Zoneminder is starting, and runs, I just can't get to the web interface.

I followed your instructions to the letter but when I do, lighttpd fails to start. I don't see anything in the lighttpd logs file, but when I run ps -ef | grep light here's what I see:

Quote:
root 871 1 0 Oct02 ? 00:00:02 runsvdir -P /service log: f line: 37 pos: 1 parser failed somehow near here: (EOL) ?2012-10-04 14:08:36: (configfile.c.912) source: /etc/lighttpd/conf.include line: 7 pos: 1 parser failed somehow near here: (EOL) ?2012-10-04 14:08:36: (configfile.c.912) source: /etc/lighttpd/lighttpd.conf line: 352 pos: 8 parser failed somehow near here: (EOL) ?lighttpd-angel.c.140: child (pid=2372) exited normally with exitcode: 255?
root 876 871 0 Oct02 ? 00:00:00 runsv lighttpd
root 2377 28255 0 14:08 pts/2 00:00:00 grep light


The offending code is in /etc/lighttpd/conf.include - whenever I insert your code lighttpd fails, and I have no access to any of the web sites on my mythbox. I've also tried putting your code in the supplemental config file /usr/MythVantage/etc/lighttpd-supplement.conf, with the same result.

One difference is that I use nano, not sudoedit. Of course, first I become root. Another difference may be that when I did my new clean install of Linhes 7.4, I selected the extra web application, Xymon - that may have changed some things in the lighttpd configuration. Here are contents of my /etc/lighttpd/conf.include:

Quote:
include "/usr/MythVantage/etc/lighttpd-supplement.conf"


and here are the contents of /usr/MythVantage/etc/lighttpd-supplement.conf:

Quote:
#server.errorlog-use-syslog = "enable"
#$HTTP["url"] !~ "\.(jpe?g|png|gif|css)" { accesslog.use-syslog = "enable" }

$HTTP["url"] =~ "(mythweb)" {
server.error-handler-404 = "/error/mythweb.html"
}

$HTTP["url"] =~ "(phpMyAdmin)" {
server.error-handler-404 = "/error/phpadmin.html"
}

$HTTP["url"] =~ "(xymon)" {
server.error-handler-404 = "/error/hobbit.html"
}

$HTTP["url"] =~ "(mythexport)" {
server.error-handler-404 = "/error/mythexport.html"
}

$HTTP["url"] =~ "(call_log)" {
server.error-handler-404 = "/error/call_log.html"
}

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
server.errorfile-prefix = "/data/srv/httpd/htdocs/error/status-"


alias.url = ( "/logs/" => "/var/log/" )
$HTTP["url"] =~ "^/logs($|/)" {
dir-listing.activate= "enable"
dir-listing.hide-dotfiles = "enable"
dir-listing.external-css = "/frame.css"
}



#cgi.assign = ( ".pl" => "/usr/bin/perl",
# ".sh" => "/bin/bash" ,
# ".py" => "/usr/bin/python" ,
# ".cgi" => "/bin/bash" )


$SERVER["socket"] == ":1337" {
server.document-root = "/data/srv/httpd/cgi/"
alias.url = ( "/templates/" => "/data/home/mythtv/templates/" )

}


#### status module
status.status-url = "/server-status"
status.config-url = "/server-config"

#ssi.extension = ( ".shtml" )


As you can see, your code is not in place at this time, I removed it so that lighttpd could start. I inserted exactly what you have in your instructions, but am unsure of any placement requirements - should this go at the top of the file, or somewhere else?

Quote:
alias.url = (
"/cgi-zm" => "/srv/zoneminder/cgi-bin/",
"/zm" => "/srv/zoneminder/www/"
)
$HTTP["url"] =~ "^/cgi-zm" {
cgi.assign = ( "" => "" )
}


I have no idea how to fix this. Do you have any ideas? Anyone? I'd really like to get this working.


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Thu Oct 11, 2012 10:28 pm 
Offline
Joined: Wed Jan 18, 2006 8:36 pm
Posts: 199
kbeatty wrote:
I have no idea how to fix this. Do you have any ideas? Anyone? I'd really like to get this working.


I looked through your configuration, but I do not have any quick fixes. My suggestion is to empty your /etc/lighttpd/conf.include file and make sure that works. Once that works, try just adding:

Code:
alias.url = (
  "/cgi-zm" => "/srv/zoneminder/cgi-bin/",
  "/zm" => "/srv/zoneminder/www/"
)

and see if lighttpd starts. If that works, add the next piece, etc.


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Mon Oct 15, 2012 2:30 pm 
Offline
Joined: Sun Mar 26, 2006 5:30 pm
Posts: 10
Thanks again bobmyth, you were right all along - It turns out that I don't need ANYTHING other than your code in /etc/lighttpd/conf.include for LinHES and ZoneMinder to work properly, at least from my simple tests. All the web sites are working, RRD, XYMON, MYTHWEB, and ZM. I seriously can't find any difference with the way the web server works or the pages it serves, except that it also works with ZoneMinder now. That's ok by me, I was just sure that I needed the information contained in those files to keep the rest of the system working.

So to recap, I removed everything (the include statement) from /etc/lighttpd/include.conf and replaced it with your code:

Code:
[alias.url = (
  "/cgi-zm" => "/srv/zoneminder/cgi-bin/",
  "/zm" => "/srv/zoneminder/www/"
)


Now the ZM site comes up in my browser, I can stop and start it from the GUI, add monitors, and even capture frames. However I do have one major issue that I'm having trouble with - no video when I try to watch a camera. I get the small window with the video controls, but no video - just a blank box. I know the camera is working because I can capture frames in modetect mode and export them and see them that way, but there's no monitor video available... I remember this happened the last time I tried getting ZM running on LinHES 6 - I punted on that and installed ZM on a different box running Ubuntu 10.04 and I've been using that without any issues. I realize I'm hijacking my own thread here, but if anyone has an insight I'd sure appreciate it. I'll also peruse the ZM forums for help with this one.


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Wed Oct 24, 2012 8:57 am 
Offline
Joined: Wed Jan 18, 2006 8:36 pm
Posts: 199
kbeatty wrote:
However I do have one major issue that I'm having trouble with - no video when I try to watch a camera. I get the small window with the video controls, but no video - just a blank box.


Sorry to be so brief, I had this issue to and it has to do with the cgi-bin/cgi-zm alias portion because that is what is used to render the video. Check those portions of your configuration file and let me know.


Top
 Profile  
 
 Post subject: Re: Zoneminder and R7.4
PostPosted: Thu Nov 01, 2012 2:53 pm 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
Just thought I would leave this here as a FYI for R8
http://linhes.org/issues/857


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Google [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu