In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to install nagios. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
First, install the operating environment
Yum-y install httpd php gcc glibc glibc-common gd gd-devel libpang libjpeg zlib
Create users and user groups
Useradd-s / sbin/nologin nagios
Groupadd nagcmd
Usermod-G nagcmd nagios
Usermod-G nagcmd apache
3. Compile and install nagios
# #
Make install-init installs startup scripts into / etc/rc.d/init.d
Make install-commandmode is the appropriate permission to modify additional command files.
Make install-config writes the sample configuration file to the / usr/local/nagios/etc directory
# #
Tar-zxf nagiosxxxx
Cd / nagiosxxx
. / configure-- with-command-group=nagcmd
Make all
Make install
Make install-init
Make install-config
Make install-commandmode
Make install-webconf
IV. Nagios installation directory and configuration files
/ usr/local/nagios # default installation directory
Bin# test command directory
Etc# profile directory
Libexec# plug-in directory
Sbin#cgi script directory
Share#nagios web page file directory
Data generated during the operation of var#nagios
/ usr/local/nagios/etc
Cgi.cfg#cgi program configuration file
Nagios.cfg#nagios service master profile
Resource.cfg# definition nagios variable file
/ usr/local/nagios/etc/objects # configuration of monitoring object profile monitoring template
Commands.cfg# definition Monitoring Command profile
Localhos.cfg# definition Monitoring Native object profile
Contacts.cfg# specifies the mailbox to send alarm mail.
Timeperiods.cfg# monitoring time template file
Templates.cfg# monitoring mode template file
Fifth, install plug-ins
Tar zxf nagios-plugins
Cd nagios-plugins
. / configure-with-nagios-user=nagios-with-nagios-group=nagcmd
Make & & make install
The use of plug-ins
Cd / usr/local/nagios/libexec
. / check_http-- help
. / check_http-H localhost-p 80
Because there is no related command detection in NFS, the general check_tcp is used.
. / check-tcp-p 2049
The nagios login page requires a user name and password to establish a corresponding password file according to the configuration file. It is best to use nagiosadmin because the administrator name defined in the configuration file is him.
Configure password:
Htpasswd-cm / usr/local/nagios/etc/htpasswd.users nagiosadmin
Start httpd
Service httpd restart
Start nagios
Service nagios start
Through the browser
Native ip/nagios
Thank you for reading! 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, you can 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.