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

How to install nagios

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail how to install nagios. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Nagios function: a tool that uses web web pages to monitor the status of other servers

Composition:

Nagios Core, the core module, does not do specific monitoring work.

Plugins is combined with the core module to monitor a specific object.

Who to work with:

1. Hosts, switches, routers, virtual machines

2. Services / resources

3. Contact person

4. Time period

5. Command

Installation:

# yum-y install httpd gcc glibc glibc-common gd gd-devel php php-mysql mysql mysql-server mysql-devel

Create groups and users

# groupadd-r nagcmd

# useradd-G nagcmd-r-s / sbin/nologin nagios

# echo 'redhat' | passwd-- stdin nagios & > / dev/null

# usermod-a-G nagcmd apache

# tar zxf nagios-3.3.1.tar.gz

# cd nagios

Compile and install:

#. / configure-sysconfdir=/etc/nagios-with-command-group=nagcmd-enable-event-broker-prefix=/usr/local/nagios

# make all

# make install

# make install-init

# make install-commandmode

# make install-config

# make install-webconf

Modify the default contact of nagios; (if the monitoring server goes down, the person you are looking for)

# vim / etc/nagios/objects/contacts.cfg

Email nagios@localhost

The administrator who created the web interface of the nagios monitoring service

# htpasswd-c / etc/nagios/htpasswd.users nagiosadmin

# cat / etc/httpd/conf.d/nagios.conf

# tar axf nagios-plugins-1.4.15.tar.gz

# cd nagios-plugins-1.4.15

Compile and install options:

#. / configure-with-nagios-user=nagios-with-nagios-group=nagios-with-mysql

# make & & make install

# chown-R nagios.nagcmd / etc/nagios

# chown-R apache.nagcmd / etc/httpd

# chown-R nagios.nagcmd / usr/local/nagios

# chkconfig-add nagios

# chkconfig nagios on

# service nagios start

# service httpd start

Turn off the setenforce and context values:

# setenforce 0

# chcon-R-t httpd_sys_content_t / usr/local/nagios/sbin

# chcon-R-t httpd_sys_content_t / usr/local/nagios/share

This is the end of the article on "how to install nagios". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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

Development

Wechat

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

12
Report