Nagios installation

xiaoxiao2021-03-06  49

Nagios installation

YHJ1065 published on December 08, 2004

First, the required software nagios-1.2.tar.gznagios-plugins-1.3.1.tar.gzimagepak-base.tar.gz 2, install the Nagios-1.2.tar.gz to / home directory CP Nagios-1.2. Tar.gz / homecd / home tar -xvzf nagios-1.2.tar.gz MKDIR / USR / local / Nagios PW UserAdd Nagios -D / usr / local / nagios chmod 755 / usr / local / nagios CD Nagios-1.2./configure --Prefix = / usr / local / nagios --with-gd-lib = / usr / local / lib --with-gd-inc= / usr / local / include

Make all

Make Install

Make install-init

Make Install-CommandMode

Make Install-Config

Note: It may not be done when MakeInstall-init this step, then just add a root group.

PW addgroup root

GD installation can be installed with ports, which will be more convenient, CD / USR / PORTS / Graphic / GD then make install.

Third, Nagios-Plugins installation

Tar-xvzf nagios-plugins-1.3.1.tar.gz

CD Nagiso-Plugins-1.3.1

./configure --Prefix = / usr / local / nagios-plugins

Make all

Make Install

After the installation is complete, the / usr / local / nagios-plugins-plugins will generate a libexec directory, move all of the directory to the / usr / local / nagios directory.

Fourth, imagePak-base.tar.gz installation

Tar

-xvzf imagepak-base.tar.gz

After decompression is the base directory

CP

-A Base / USR / Local / Nagios / Share / Images / Logos

The installation process ends all.

Additional Scriptalias / Nagios / CGIOS / / / USR / local / NAGIOS / / / USR / local / NAGIOS / / USBA

ALLOWOVERRIDE AUTHCONFIG

Options Execcgi

ORDER ALOW, DENY

ALLOW FROM All

Alias ​​/ Nagios / / / usr / local / nagios / share /

Options none

ALLOWOVERRIDE AUTHCONFIG

ORDER ALOW, DENY

Allow from all

Set access

In / usr / local / nagios / share directory

vi .htaccessauthname "Nagios Access" Authtype Basic

Authiserfile /usR/local/nagios/etc/.htpasswd

Require Valid-User

Then in / usr / local / nagios / sbin editing .htpasswd

vi .htpasswd

Authname "Nagios Access"

Authtype Basic

Authiserfile /usR/local/nagios/etc/.htpasswd

Require Valid-User

/ usr / local / apache / bin / htpasswd

-c /usr/local/nagios/etc/.htpasswd nagios nagios

This apache directory varies depending on the installation directory, mainly, so use .htpasswd command to generate username and password.

The installation and setup process are all completed.

Under / usr / local / nagios / etc is a Nagios configuration template file -sample, copy all the .cfg-sample files .cfg

For example: cp nagios.cfg-sample nagios.cfg

All copies are completed.

Then cp dependencies.cfg dependencies.cfg.bak

vi dependendencies.cfg

Then save it. (That is to replace the original deprondencies.cfg file with an empty file, otherwise it will be wrong, you can test yourself)

Then check if the configuration file is wrong.

/ usr / local / nagios / bin / nagios

-v /uss/local/nagios/etc/nagios.cfg

This kind of tips are correct

Total Warnings: 0

Total Errors: 0

Warnings and errors should be 0

If an error is wrong, it is .cfg file problem

Start the background process

/ usr / local / nagios / bin / nagios -v /usr/local/nagios/etc/nagios.cfg

Below you can enter in your browser

http: // Your IP / NAGIOS / INDEX.HTML

If some pages can't see it. Can be in the cgi.cfg file

Take the ## before the option with Authorized.

The above is the test in FreeBSD-5.1-Realease, and the specific setting has not been understood, huh, huh.

转载请注明原文地址:https://www.9cbs.com/read-83044.html

New Post(0)