How to move ZM directories?

Support and queries relating to all previous versions of ZoneMinder
zm2009
Posts: 13
Joined: Mon Sep 29, 2008 4:11 am

Post by zm2009 »

cordel wrote:His configuration is just not right and some how there are duplicates which means somethings were done that should have never been.

The question becomes what was done as it needs to be undone.
my guess would be the php files should be in the /usr/share/zoneminder directory as aliased in the http.zm.conf as it's how most of the packagers do since we started packaging rpms a couple years back. But it don't really matter so long as you configure apahe correctly.

Remove the link from /var/www as you should not need it and whom ever told you to put it there don't know what he is doing. If apache is using the link, it should not be.
Restart apache and everything should still work. If it don't, report back the error reported by apache.
Cordel: With all due respect, I simply followed a basic howto, step-by-step as I mentioned above (no fancy changes that I am aware of). If anything, my setup would only be out of wack because I have been trying to get this directory change accomplished by creating symlinks for "events". Remember through all of this Zoneminder worked perfectly (except for Email notification).

In any case, I got it working -- here is how:

1) Stop Zoneminder

Code: Select all

/etc/init.d/zoneminder stop
2) Copy zoneminder files w/o (i.e., "dereference") symlinks

Code: Select all

cp -prvL /usr/share/zoneminder /zm
(PS, I allowed it to copy to a directory below /zm because I had already copied events to /zm/events when attempting the previous suggestion of symlinks and files were trying to overwrite themselves which would kill the copy, so I put the ZM files one directory lower)
3) within the /usr/share/zoneminder directory, do:

Code: Select all

cd /usr/share/zoneminder
ln -s /zm/zoneminder /var/www/zm
(/zm is the mount point of my zoneminder-exclusive LVM)
4) Restart Zoneminder

Code: Select all

/etc/init.d/zoneminder start
Appears to work perfectly, and % free matches what is available on the LVM
PS: Never touched, modified, restarted apache at all -- which is one reason I liked this way.

Please let me know if this is not good or will cause any problems. Thanks all.
throwgood
Posts: 18
Joined: Mon Oct 27, 2008 10:33 pm

Post by throwgood »

I completely agree that something is very wrong with the setup. I installed from source so I didn't know what apt-get automatically does. If the installer adds the alias then I would go with cordel's suggestion of removing the /var/www/zm symlink as it is not needed.
throwgood
Posts: 18
Joined: Mon Oct 27, 2008 10:33 pm

Post by throwgood »

zm2009

Well what you really did was just get rid of the symlink from /usr/share/zoneminder to /var/www/zm. If I read this correctly you copied everything from /usr/share/zoneminder to /zm/zoneminder so now you have two directories with zoneminder files. Then you symlinked /zm/zoneminder to /var/www/zm. However your apache alias directive still has /zm /usr/share/zoneminder so as far as zoneminder is concerned it lives in /usr/share/zoneminder. In /usr/share/zoneminder you point events to /zm/events. Since apache never goes to /var/www/zm it won't ever go to /zm/zoneminder, all new events should be going to /zm/events. I am willing to bet if you renamed /usr/share/zoneminder to /usr/share/testzoneminder that your zoneminder will break. I am also willing to bet that if you removed /var/www/zm and /zm/zoneminder your installation will still work. That symlink to /var/www/zm is what threw your whole installation off. I would clean this up as soon as possible the longer you leave it the more you will forget which directory is the live one and which is just a copy, plus it will just take up space and possibly trip you up again when you have to upgrade.
zm2009
Posts: 13
Joined: Mon Sep 29, 2008 4:11 am

Post by zm2009 »

Here are the HowTo's I reviewed to do the install:

1) http://handband.net/wiki/index.php?titl ... ZoneMinder

2) http://www.howtoforge.com/video_surveil ... der_ubuntu

and of course:

3) Debian http://www.zoneminder.com/fileadmin/dow ... nstall.doc or http://www.zoneminder.com/downloads/Zon ... nstall.doc

I am not sure what it is you are saying is done incorrectly.
throwgood
Posts: 18
Joined: Mon Oct 27, 2008 10:33 pm

Post by throwgood »

Well lets try it this way:

1. In your how-to's explain to me why step 4 in http://handband.net/wiki/index.php?titl ... ZoneMinder is needed and why it isn't listed in any of the other how-to's?
2. How does Apache know that /zm/zoneminder exsists?
3. What does the Alias directive in your apache config for /zm /usr/share/zoneminder do?

After answering these three questions you will see why question number one isn't needed and why copying /usr/share/zoneminder to /zm/zoneminder is useless and how much symlinking /zm/zoneminder to /var/www/zm doesn't matter. These are the questions you should be asking yourself which will help you understand how Linux / UNIX / ZM works. Man pages are hard and all of us have struggled to read them once and a while but we re-read and work on it until we understand it. How-to's are fine to get you started but don't use them as your rebuttal to why you don't understand something. If you figure out the answers to the questions great, if you have more questions post them.
zm2009
Posts: 13
Joined: Mon Sep 29, 2008 4:11 am

Post by zm2009 »

throwgood wrote:Well lets try it this way:

1. In your how-to's explain to me why step 4 in http://handband.net/wiki/index.php?titl ... ZoneMinder is needed and why it isn't listed in any of the other how-to's?
2. How does Apache know that /zm/zoneminder exsists?
3. What does the Alias directive in your apache config for /zm /usr/share/zoneminder do?

After answering these three questions you will see why question number one isn't needed and why copying /usr/share/zoneminder to /zm/zoneminder is useless and how much symlinking /zm/zoneminder to /var/www/zm doesn't matter. These are the questions you should be asking yourself which will help you understand how Linux / UNIX / ZM works. Man pages are hard and all of us have struggled to read them once and a while but we re-read and work on it until we understand it. How-to's are fine to get you started but don't use them as your rebuttal to why you don't understand something. If you figure out the answers to the questions great, if you have more questions post them.
None of them are "my" howto's -- in fact, they are howto's I found after hearing about Zoneminder and doing some Googling to find out more.

And BTW, I didn't initially know about the Debian instructions. I like howtoforge.com for Linux guides and went to that one first. I simply followed directions not knowing any better.

PS: As I have said numerous times before, it appears (to me) to be working fine. The only "problem" was the desire to change the directory that collects the bulk of the data (and that Email notifications don't seem to work).
throwgood
Posts: 18
Joined: Mon Oct 27, 2008 10:33 pm

Post by throwgood »

Are you serious? I know there not "your" how-to's you couldn't possibly write something like this because you don't know anything about zoneminder.

You asked this:
"I am not sure what it is you are saying is done incorrectly."

I just explained it to you above. Maybe I'm not being clear.

1. /zm/zoneminder is useless read this USELESS your events are not going there.
2. The /zm/zoneminder to /var/www/zm symlink is USELESS read it USELESS.
3. All your events are going to /zm/events not /zm/zoneminder/events

A little tip, don't come on a forum and ask for help if your going to use some how-to as your excuse for not wanting to learn. Being naive only works when you first post not when you have been told what to do. What you had to do is easy I know I've done it. I was trying to be nice and explain your problem and the solution. Your zoneminder "seems" to be working because you don't understand why it is working. Sometimes I wonder why I even bother helping people like you and YES YES YES YES for the last time we know your e-mails aren't working since it has nothing to do with moving the events directory stop typing it. If you follow instructions any way like you followed these ones its going to be a while before your e-mail will be fixed. Don't bother responding you can't add anything useful.
zm2009
Posts: 13
Joined: Mon Sep 29, 2008 4:11 am

Post by zm2009 »

throwgood wrote:Are you serious? I know there not "your" how-to's you couldn't possibly write something like this because you don't know anything about zoneminder.

You asked this:
"I am not sure what it is you are saying is done incorrectly."

I just explained it to you above. Maybe I'm not being clear.

1. /zm/zoneminder is useless read this USELESS your events are not going there.
2. The /zm/zoneminder to /var/www/zm symlink is USELESS read it USELESS.
3. All your events are going to /zm/events not /zm/zoneminder/events

A little tip, don't come on a forum and ask for help if your going to use some how-to as your excuse for not wanting to learn. Being naive only works when you first post not when you have been told what to do. What you had to do is easy I know I've done it. I was trying to be nice and explain your problem and the solution. Your zoneminder "seems" to be working because you don't understand why it is working. Sometimes I wonder why I even bother helping people like you and YES YES YES YES for the last time we know your e-mails aren't working since it has nothing to do with moving the events directory stop typing it. If you follow instructions any way like you followed these ones its going to be a while before your e-mail will be fixed. Don't bother responding you can't add anything useful.
You sir/madame, need to get a drink and chill the hell out.

I am here BECAUSE I wanted to learn how to change directories.

Remember: I have a working ZM configuration -- which has performed wonderfully over the last 30 days of "testing".

I really don't understand the sense of being so damned condescending when someone is simply asking questions. Keep the personal attacks to yourself, because it is of no use to me and makes you look like an overbearing idiot.

It is not my first time around the block with Linux or installing a new system ... but it IS my first time with ZoneMinder and I am far from being a Linux expert ... so kindly keep that in mind before you start bashing people for asking questions.

Again, thanks to those who provided some constructive feedback and input without being *ssholes, I appreciate it.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

I think that's enough :!:
The only howto's that are supported here are the ones created by the developer here as it seems that any one with the notion can create a great looking incorrect howto. ;)
No more personal opinion of other members or I start banning.
Locked