Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello
I am trying to set up a camera on my local network. I have Fedora release 20 (Heisenbug)
I built Zoneminder but I am stuck trying to understand #8 in the INSTALL file
"Create an apache virtual host for ZoneMinder. Make sure to use the same paths as ZM_WEBDIR and ZM_CGIDIR in /etc/zm.conf"
I'm not sure, but I think they are refering to setting up the server so that the Zoneminder web page can appear on the local host. http://localhost works, but there is no webpage for Zoneminder at http://localhost/zm/
My question is: How do I make a virtual host, especially for this particular situation? I have found examples, but they all vary in ways that I don't how to adjust for. For example http://terminal28.com/how-to-install...x-cctv-debian/
It sets everything up in /etc/apache2/ which I don't have. Is that a standard installation location for all versions of linux?
Also, there is no ZM_WEBDIR and ZM_CGIDIR in /etc/zm.conf
but it does have ZM_PATH_WEB and ZM_PATH_CGI
The link below is specific to zoneminder on Fedora (18), don't know if that matters. Some of the problems you are having are related to the instructions being different for Fedora. I set up zoneminder on Ubuntu 12.04 recently and it works fine. Some minor setup problems as it was new to me.
Thank you for your reply. I've looked at those links until I'm blue in the face and I still haven't got the vaguest clue what I'm supposed to do.
First of all, can you confirm that "setting up a virtual host for Zoneminder" means setting up the server so that the Zoneminder web page can appear on the local host. http://localhost works, but there is no webpage for Zoneminder at http://localhost/zm/
So after I set up a virtual host, the content for Zoneminder will appear at http://localhost/zm/ Correct?
When you say :
Quote:
In that same directory, you should have an apache.conf or httpd.conf file.
I don't know what directory you are refering to. I have not yet found any httpd.conf file anywhere
zm.conf file is at /etc/zm.conf
It says:
# Path to ZoneMinder web files
ZM_PATH_WEB=/usr/local/share/zoneminder/www
# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/local/libexec/zoneminder/cgi-bin
My apache conf.d is at /etc/httpd/conf.d
What specifically do I need to do to set up a virtual host? I have a vague idea that it involves opening or creating some kind of configuration file but I don't know which file or what to put into it.
If you have a directory /etc/httpd then you have Apache installed. The main configuration file is usually httpd.conf which should be there somewhere. I don't use Fedora so can't really say what they use. Checked the Fedora site and it should be: /etc/httpd/conf/httpd.conf
Quote:
So after I set up a virtual host, the content for Zoneminder will appear at http://localhost/zm/ Correct?
Yes. I did not do anything specific to this when I installed zoneminder. There was an apache.conf file in the /etc/zm directory created during the zoneminder setup.
On my install (NOT Fedora) there is an /etc/zm directory and there are configuration files for both zoneminder and apache. I would think you would need a specific Apache config file dealing with zoneminder. The paths you list in the zm.conf are different than mine but that might be because you are using Fedora and I used Ubuntu.
Did you have LAMP installed prior to installing zoneminder? You have the L (fedora) and the A (apache) so do you have mysql(MariaDB) and php installed? If not the link below explains it on Fedora. You need mysql and php installed before zoneminder. If you've already done that, just ignore the link:
I have LAMP. http://localhost is working. The zm database is working. I do have a file at /etc/httpd/conf/httpd.conf
However I don't think Fedora even uses httpd.conf
My zoneminder is not even running, so I need to backup and figure out another approach. I may just switch to unbuntu.
I did find this helpful page about apache configuration files on fedora http://articles.slicehost.com/2010/5...iles-on-fedora
Thanks for the tips.
According to the Fedora page you start it with: systemctl start zoneminder.service
Part of the problem is the second link you posted in your initial post was specific to Debian and that might be the cause of a lot of the problems.
[root@localhost ZoneMinder-1.27.0]# systemctl start zoneminder.service
Failed to issue method call: Unit zoneminder.service failed to load: No such file or directory.
I have absolutely no idea what that means. I compiled zoneminder, I ran cmake and make install. What am I missing?
I haven't used anything from that other page because I couldn't figure out how.
Failed to issue method call: Unit zoneminder.service failed to load: No such file or directory.
It is not configured properly. I'm not sure why you used the method you did, from the link you originally posted. With most major Linux distributions, you should install with the package manager or Software Center. On Debian and Ubuntu derivatives, you would use the "apt-get intall" command. On Fedora, you would use "yum". If you look at the link below which is similar to one I posted earlier, you will see:
Quote:
ZoneMinder is developed on the Fedora distribution and no special actions are usually required for installation.
Some differences between Fedora and Debian/Ubuntu:
Quote:
However there are some services that need to be enabled e.g. mysql, http as they are not by default when a Fedora system is set up. Do note Debian or Ubuntu have these running as default when installed.
So if you use Debian/Ubuntu, you won't need to manually start the services listed above, on Fedora you will.
The link to the page I am referring to. The grey boxes are commands which need to be entered in a terminal and you hit the Enter key and watch the output. The one box with multiple lines, those are each individual commands and you will need to hit the Enter key after each. Most of them won't apply as you already have apache, not sure if you have mysql or MariaDB configured or installed?
I would read the page a few times to get familiar with it. I expect you would have had fewer problems if you had installed using the yum package manager. If you want to remove zoneminder and start over with it you should be able to use yum to do that also:
yum remove zoneminder (You may need the version number included in the command)
I originally did install it with the yum package manager. I got all the services running, including Zoneminder, but there was no picture. I tried every possible setting that I could possibly imagine. My camera works fine in vlc.
If you mean why did I build and install from the install file that cam with the build, I did that so I could build Zoneminder with vlc, so that the vlc option would be available in the zoneminder settings.
Here are a couple of things I had to do to get it working. I added www-data to the video group. This won't work in Fedora, see below. You need to add apache to the video group.
Quote:
By default, the httpd daemon runs as the user and group apache. Therefore, all files that the httpd needs to access to operate properly must be accessible by user apache
I changed the owner:group of /dev/video to www-data so you may need to change that to apache:apache. If you make either of these changes you will need to restart apache. Also, to have mysql start before zoneminder (which is necessary) add this: sleep 15 to the /etc/init.d/zoneminder file. It needs to be on the line just abovethe line: zmfix -a It is near the top of the file. I don't know if Fedora uses init.d, it may be another directory but there should be a zoneminder file somewhere. Check the Fedora link below:
I also linked apache to zoneminder with the command below. You will have to change that to point to the correct zoneminder.conf file as there is no apache2 directory. If you don't have a zm directory in /etc, it won't work.
I did get the zoneminder-apache connection to work by starting over with the package instead of building it myself
Now I'm running into another problem.
I'm using Fedora 20
The zoneminder service is running, the monitor is set up but not getting any images.
I'm getting this error
Can't open memory map file /dev/shm/zm.mmap.2:No such file or directory.
What would cause this error? I did this on a newly installed Fedora 20 system, so why would this happen?
What usually happens to make that file?
Can't open memory map file /dev/shm/zm.mmap.2:No such file or directory.
What would cause this error?
Not having that file. I have that file on my system so I don't know why you would not. The site below gives an explanation and possible solution of the "Can't open memory map file...", scroll about half way down the page.
The FAQ at Zoneminder below gives an explanation which I think would apply although the error is not exactly the same. It is a problem with shared memory and resolution settings. I'm using a little Acer notebook and the Capture settings are: 320x240. The quote below is from the link I post below. I would open zoneminder and click on /dev/video0 and in the new window which opens, click the Source tab and then change the Capture Width/Height to 320/240 and restart zoneminder. If you get images, then you can follow the link below to increase max shared memory. Not sure why you don't have the zm.mmap.2 file or why it has a '2' at the end, mine has a 1?
Quote:
In recent kernels the shmmax is set to 33554432 bytes for only 32 MB of maximum shared memory allocatable at a time, hardly enough for ZoneMinder to go above 320 x 240 x 24-bit
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.