Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed installation process of Nagios

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "detailed installation process of Nagios", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "the detailed installation process of Nagios"!

Nagios is an enterprise network monitoring system, which is so powerful and easy to manage that many large network companies highly praise it and put it into their own network environment. Let's take a look at the Nagios installation process.

I. Nagios installation Guide (based on Fedora11 platform)

1. Pre-installation preparation

1.1 install under root root

Su-l1.2 install Apach

Yuminstallhttpd1.3 installs the GCC compiler

Yuminstallgcc

1.4 install GD libraries and development libraries

Yuminstallgdgd-devel

Download Nagios and plug-in packages

Http://www.nagios.org/download/Step1-DownloadNagiosCore

Http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.1.2.tar.gzStep2-DownloadNagiosPlugins

Http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gzStep3-DownloadNagiosAddons

Http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz

2.Nagios installation process

2.1 set up an account

2.1.1 create an account named nagios and give the login password:

/ usr/sbin/useraddnagios

Passwdnagios

2.1.2 create a user group named nagcmd to execute external commands from the Web interface

/ usr/sbin/groupaddnagcmd

2.1.3 add both nagios and Apache users to this user group

/ usr/sbin/usermod-Gnagcmdnagios

/ usr/sbin/usermod-Gnagcmdapache

2.2 compilation and Nagios installation

2.2.1 expand the Nagios source package

Tarxzfnagios-3.1.2.tar.gz

Cdnagios-3.1.22.2.2 runs the Nagios configuration script and uses the previously opened users and user groups

. / configure-with-command-group=nagcmd

2.2.3 compile the source code of the Nagios package

Makeall

2.2.4 install binary runtime programs, initialize scripts, sample configuration files, and set run directory permissions

Makeinstall

Makeinstall-init

Makeinstall-config

Makeinstall-commandmod

2.3 customized configuration

Sample configuration files are available at / usr/local/nagios/etc/

Edit / usr/local/nagios/etc/objects/contacts.cfg configuration file

Change the email address, and the email information in the contact definition information of nagiosadmin is your own emial information to receive the alarm content.

Vi/usr/local/nagios/etc/objects/contacts.cfg

2.4 configure Web Interfac

2.4.1 install the Web configuration file of Nagios to the conf.d directory of Apache

Makeinstall-webconf

2.4.2 create a nagiosadmin user for Nagios's Web interface login

Htpasswd-c/usr/local/nagios/etc/htpasswd.usersnagiosadmin2.4.3 restarts the Apache service for the settings to take effect

Servicehttpdrestart

2.5 compile and install the Nagios plug-in

2.5.1 expand the source package of the Nagios plug-in

Tarxzfnagios-plugins-1.4.13.tar.gzcdnagios-plugins-1.4.13

2.5.2 compile and install the plug-in

/ configure--with-nagios-user=nagios--with-nagios-group=nagiosmake

Makeinstall

2.6 start Nagios

2.6.1 add Nagios to the list of services so that it starts automatically when the system starts

Chkconfig--addnagios

Chkconfignagioson

2.6.2 verify the sample configuration file for Nagios

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

2.6.3 if there is no error, you can start the Nagios service

Servicenagiosstart

2.6.4 if there is an error in the sample configuration file, follow the error prompt to go back to the above step to troubleshoot

2.7 change SELinux settin

Mandatory mode will be used by default after simultaneous release and installation of 2.7.1Fedora and SELinux, which will result in an "internal service error" message when trying to connect to Nagios's CGI

2.7.2 Edit / etc/selinux/config

Vi/etc/selinux/config2.7.3 modifies the value of the SELINUX field to put SELinux in allowable mode

Change SELINUX=enforcing to SELINUX=permissive

2.8 Log in to the Web interface

2.8.1 use the browser installed by default on the system

2.8.2 successfully log in to the Web interface

Thank you for your reading, the above is the content of "the detailed installation process of Nagios", after the study of this article, I believe you have a deeper understanding of the detailed installation process of Nagios, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report