1

I'm trying to put together a small piece of software, and I wanted to know the appropriate place to put various items if I'm setting to use /usr/local.

For example, under /usr/local I will have:

bin etc lib

But what about variable data like logs? Does they still go to /var/log? It seems weird to pollute /var/log with something non-standard running out of /usr/local.

What about other input data that isn't considered runnable code? I noticed that some software uses /usr/local/PKG-NAME/ to store this kind of data.

Oh and I also have to put a lockfile somewhere.

0

Look at how other 3rd-party software does this on your system.

On OpenBSD, 3rd-party packages install under /usr/local but uses /var for variable data (since that's what /var is for). Some packages create /var/pkgname directories (like mysql) and some may create /var/log/pkgname (like ConsoleKit seems to do) depending on what type of data it needs to store under /var.

For private and local (small, datawise) projects, I see no real reason to not use /usr/local/var except with the important caveat that /, /usr or /usr/local (if these separate mount points from /var) may possibly fill up if the application produces huge datasets. If / fills up, this will possibly prevent the system from functioning properly (this is why /var is usually on its own filesystem). If /usr/local fills up, this will prevent installing further software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.