Nagios Core Concern

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
vnoc
Posts: 54
Joined: Thu Jul 27, 2017 1:51 am

Nagios Core Concern

Post by vnoc »

Hi Team,

Can we install nagios in different partition as below

/home/appuser
/opt
/apps

Why should we install it only /usr/local/ .Could you please explain me
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Nagios Core Concern

Post by mcapra »

Most configure scripts allow you to set the prefix, which for Nagios Core is /usr/local/nagios by default:

From configure --help

Code: Select all

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local/nagios]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/nagios/bin', `/usr/local/nagios/lib' etc.  You can specify
an installation prefix other than `/usr/local/nagios' using `--prefix',
for instance `--prefix=$HOME'.
And if you want to get more granular than that:

Code: Select all

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
vnoc wrote:Why should we install it only /usr/local/ .Could you please explain me
http://www.pathname.com/fhs/pub/fhs-2.3.pdf

From page 21:
The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to
be safe from being overwritten when the system software is updated. It may be used for programs and data that
are shareable amongst a group of hosts, but not found in /usr.

Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to
replace or upgrade software in /usr.
Strictly speaking, it doesn't really matter where you install Nagios Core as far as Nagios Core is concerned, but most mainstream Linux flavors follow FHS.
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core Concern

Post by scottwilkerson »

To add to what @mcapra said, the other benefit is that much of the documentation is going to assume the /usr/local/nagios defaults.

Just something to keep in mind that you will have to adjust the docs to whatever locations you choose.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked