I. Preface:
1. Make sure that you have the root permission on the machine before installation.
2. confirm that the following software package has been installed on your installed linux system and continue.
Gcc compiler, gd library and Development Library
Note:
You can use the yum command to install these software packages. type the command:
Yum-y install httpd gcc glibc-common gd-devel
Read more: round-robin and progressive Nagios --- operation (2) Configure Nagios
2. Preparations before installation
1. Create a nagios user and user group. This is
[Root @ localhost ~] # Useradd-s/sbin/nologin nagios
[Root @ localhost ~] # Mkdir/usr/local/nagios
[Root @ localhost ~] # Chown-R nagios. nagios/usr/local/nagios
2. Enable the sendmail service.
The main function of enabling the sendmail service on the nagios monitoring server is to enable nagios to send an alarm email when detecting a fault. Currently, almost all linux releases have their own sendmail service by default, when installing the system, you only need to enable the sendmail service without any configuration on sendmail.
3. Compile and install Nagios
[Root @ localhost ~] # Tar-zxvf nagios-3.2.0.tar.gz
[Root @ localhost ~] # Cd nagios-3.2.0
[Root@localhostnagios-3.2.0] #./configure -- prefix =/usr/local/nagios
# Specify the nagios installation directory. Here, specify nagios installation to the/usr/local/nagios directory.
[Root@localhostnagios-3.2.0] # make all
[Root@localhostnagios-3.2.0] # make install
# Make install is used to install the main program of nagios, CGI and HTML files
[Root@localhostnagios-3.2.0] # make install-init
# Run the make install-init command to create a nagios STARTUP script in the/etc/rc. d/init. d directory.
[Root@localhostnagios-3.2.0] # make install-commandmode
# Use the makeinstall-commandmode command to configure Directory Permissions
[Root@localhostnagios-3.2.0] # make install-config
# Makeinstall-cofig command is used to install the nagios sample configuration file. The installation path is/usr/local/nagios/etc.
Iv. Nagios directory Introduction
After Nagios is installed, the following table describes the directory structure and functions:
Nagios details: click here
Nagios: click here
Configure Apsara stack alarms using Nagios
Using Nagios with Apsara for SMS alert Installation
Free SMS alert configuration for Nagios Feixin Linux
How to monitor Linux Hosts and send emails to alarms through Nagios