Nagios is also a monitoring software that is more lightweight than Zabbix and has a relatively small number of servers, but mastering Nagios is one of the basic skills of operations personnel.
Nagios is in need of Apache and PHP support, the process of installing Apache in: http://chenx1242.blog.51cto.com/10430133/1762702.
Nagiosdの Installation
For the duration of this article, the stable version of Nagios is 4.1.1. Installing Nagios under Linux We need to do some preparatory work first.
Yum install-y gcc glibc glibc-common gd gd-devel xinetd openssl-devel# These are the basic components Mkdir/usr/local/nagios #建立一个 Folders are used to save Nagioscd/download #来到download文件夹wget https://assets.nagios.com/downloads/nagioscore/releases/n AGIOS-4.1.1.TAR.GZTAR-ZXVF nagios-4.1.1.tar.gz #解压缩./configure--prefix=/usr/local/nagios #安装地址定位上面建立的nagios In the folder
You will then see an interface like this:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/DF/wKiom1cLUzOB3h7XAABBzFRu8WE030.png "title=" 1.png " alt= "Wkiom1cluzob3h7xaabbzfru8we030.png"/>
Continue to #makeall, and then see this interface:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/DF/wKiom1cLU2zAGkElAAAmwWxHObI371.png "title=" 1.png " alt= "Wkiom1clu2zagkelaaamwwxhobi371.png"/>
Continue #make Install && make Install-init:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/E0/wKiom1cLVF2Q1hBMAAAth9VZ9Ug330.png "title=" 1.png " alt= "Wkiom1clvf2q1hbmaaath9vz9ug330.png"/>
Then there are #make install-commandmode and #make install-config. After the completion, you need to build a Linux system called Nagios users, but this user is not allowed to log on the system, so #useradd-S/sbin/nologin nagios, after the user is established, the use of #chmod-R Nagios.nagios/usr/local/nagios Let the user and the owning group of the Nagios folder be Nagios.
# chkconfig--add Nagios
# chkconfig--level and Nagios on
# chkconfig--list Nagios
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/DD/wKioL1cLVv_QCCnDAAAaS9z0Qqg336.png "title=" 1.png " alt= "Wkiol1clvv_qccndaaaas9z0qqg336.png"/>
Contents of the Nagios folder
#ls一下, you can see that there are many subfolders in Nagios, and the meanings of these subfolders are as follows:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7E/DD/wKioL1cLYtOzQrqmAAAWJhgKAqo986.png "title=" 1.png " alt= "Wkiol1clytozqrqmaaawjhgkaqo986.png"/>
Bin folder: There are two executable programs in Nagios and Nagiostats.
Sbin folder: The directory that executes the files required by the external command.
Etc folder: The directory where the configuration file resides.
Include folder:
Libexec folder: The directory where the external plug-in file resides.
Share folder: The directory where the Web page file exists.
var folder: Directory of log files and lock files
Nagios External Plug-in
Nagios is a monitoring software, but it does not have the monitoring function, but his plug-in with the role of monitoring, such as check-load is to view the CPU load, Check-disk is to check the hard disk capacity, and download the external plug-in is also very simple, as of the completion of this article, The external plugin version available on the official website is 2.1.1.
#wget www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz
Then./configure and make && make install, these are all commonplace, not much to write.
Reference article: http://www.cnblogs.com/mchina/archive/2013/02/20/2883404.html
This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1762638
The installation process of Nagios under Linux system