Nagios Monitor Nagios Core installation

Source: Internet
Author: User

1. Dependency packet Detection

# rpm-q httpd gcc glibc glibc-common gd gd-devel php php-mysql openssl-devel

# yum-y Install httpd gcc glibc glibc-common gd gd-devel php php-mysql openssl-devel


2. Creating Nagios users and user groups

# Groupadd Nagcmd

# useradd-g Nagcmd-s/sbin/nologin Nagios


* * Add Apache to the Nagcmd group so that you have sufficient permissions to operate Nagios through the Web interface;

# usermod-a-G Nagcmd Apache


3. Compile and install (non-RPM installation httpd Please check the source installation httpd and PHP note points)

# tar zxf nagios-3.3.1.tar.gz

# CD nagios-3.3.1

#./configure \

--prefix=/usr/local/nagios \

--with-command-group=nagcmd \

--enable-event-broker

# make All

# make Install

# Make Install-init

# Make Install-commandmode

# Make Install-config


Create the Nagios Web program configuration file in the httpd configuration file directory (CONF.D):

# Make Install-webconf


4. Service Configuration

4.1 Copy folder (can not do)

#cp-R contrib/eventhandlers//usr/local/nagios/libexec/


4.2 Configure permissions (can not do)

#chown-R Nagios:nagios/usr/local/nagios/libexec/eventhandlers


4.3 Service Add self-boot

# chkconfig--add Nagios

# chkconfig--level and Nagios on

# chkconfig--list Nagios


4.4 Creating an encrypted user

Create a user who logs in to the Nagios Web program, which is used later to log on to Nagios authentication via the Web:

# htpasswd-c/usr/local/nagios/etc/htpasswd.users NGS


4.5 Configuring CGI.CFG

The user name configured here is to be the user name of the encryption setting, or the CGI program cannot be invoked by the httpd, and the Web page will give the CGI permission exception. There are multiple user names separated by commas.

Authorized_for_system_information=ngs

Authorized_for_configuration_information=ngs

Authorized_for_system_commands=ngs

Authorized_for_all_services=ngs

Authorized_for_all_hosts=ngs

Authorized_for_all_service_commands=ngs

Authorized_for_all_host_commands=ngs


5. Verifying the configuration

5.1 Default directory Validation

There are five directories such as etc, bin, sbin, share, var under the installation path

Directory where the bin Nagios executable program resides

The directory where the ETC Nagios configuration files are located

Sbin The directory where the nagioscgi files are located, that is, the files required to execute the external command

The directory where the Share Nagios Web page file resides

Libexec Nagios External plug-in directory

The directory where the var nagios log files, lock, and other files reside

Var/archives nagios Log Auto Archive directory

VAR/RW The directory used to store external command files


5.2 Verifying the password file

#cat/usr/local/nagios/etc/htpasswd.users

Note whether the user name shown here is the user name set


5.3 Configuration file Validation

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


Acknowledgement: I refer to a number of articles after summing up, in this thank you network share!

This article is from the "4699096" blog, please be sure to keep this source http://4709096.blog.51cto.com/4699096/1702220

Nagios Monitor Nagios Core installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.