2

A package I'm using (Graphite) insists on installing into /opt/graphite.

Should logs go into /var/opt/graphite/log, or /var/log/graphite?

Presume we want to be as FHS as possible. I'm using CentOS 6--would it vary by *NIX/distro?

elliot42
  • 185
  • 6
  • Which OS are you using? – Andrew Sep 17 '12 at 01:40
  • @Andrew (Centos 6. Thx!) – elliot42 Sep 17 '12 at 01:45
  • 2
    If you're as anal about FHS compliance as I am, I've produced CentOS 6 RPMs of Graphite that are patched to be FHS-friendly: http://holyhandgrenade.org/blog/2011/10/fhs-compliant-graphite-packages-for-rhelcentos-6/ – jgoldschrafe Sep 18 '12 at 00:26
  • @jgoldschrafe Awesome! However, your `rpm-python-carbon` and `rpm-python-whisper` links appear to be broken? Neat patch, thanks! – elliot42 Sep 18 '12 at 03:45
  • I need to update that post. They're renamed to rpm-carbon and rpm-whisper on GitHub. – jgoldschrafe Sep 19 '12 at 20:38
  • This package is in EPEL as `graphite-web`. If you have EPEL configured on your system, can just `yum install graphite web`. (And these install in standard FHS locations, including logging to /var/log/graphite-web. – mattdm Dec 29 '13 at 19:00

2 Answers2

2

Yes, it would vary by */NIX/distro. Therefore, I'd put them in /opt/graphite/log : Software that install in opt should not expect /var/anything to be available.

For example, /var/opt does not even exist on a default FreeBSD installation.

However, nowadays /var/log/graphite is a safe bet : I haven't seen logs in /usr/adm/logs or /var/adm for a long time.

0

Whenever installing a package from source, I would keep it with the following layout:

/usr/local/<package_name>
|-- bin
|   |-- 
|   |-- 
|   `-- 
|-- lib
|   |-- 
|   |-- 
|   `-- 
|-- conf (or etc)
|   |-- 
|   |-- 
|   `-- 
`-- var
    |-- lock
    |-- log
    `-- run

You may also take a look at this: http://graphite.readthedocs.org/en/0.9.10/install.html#default-installation-layout

quanta
  • 50,327
  • 19
  • 152
  • 213
  • According to the FHS, `/usr` [should not be writable](http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY) (which would seem to preclude `/usr/local/.../var`). However, that installation link does have important tips for changing the install path, so thanks. – elliot42 Sep 18 '12 at 03:41