Nagios Installation Steps
1. Preparation before installation
1) Create Nagios users and user groups
Useradd-s/usr/sbin/nologin nagiosmkdir/usr/local/nagioschown-r Nagios.nagios/usr/local/nagios
2) Open System SendMail Service
/etc/init.d/sendmail start
2. Compiling and installing Nagios
TAR-ZXVF nagios-3.2.0.tar.gzcd nagios-3.2.0./configure--prefix=/usr/local/nagiosmake allmake installmake Install-initmake Install-commandmodemake Install-config
3. Nagios Directory
Bin
etc
Sbin
Share
Libexec the directory where the external plug-in resides
Var
Var/archives
Var/rw
4. Install Nagios Plugin
nagios-plugins-1.4.14
5. Install the culture plugin in Nagios
Http://sourceforge.net/projects/nagios-cn/files/./configure does not specify an installation path, the default is/usr/localmake allmake install
6. Install and configure Apache and PHP
1) Install Apache and PHP
2) Configure Apache
/usr/local/apache2/conf/httpd.conf
Modify
User Nobodygroup #-1
Revision changed to
User Nagiosgroup Nagios
And then find
DirectoryIndex index.html Index.html.var
Revision changed to
DirectoryIndex index.html index.php
Increase:
AddType application/x-httpd-php. php
Add authorization information to httpd.conf last
#setting for nagiosScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin" <Directory "/usr/local/nagios/sbin" > AuthType Basic Options execcgi allowoverride none order allow,deny Allow from all AuthName "Nagios access" Authuserfile /usr/local/nagios/etc/htpasswd require valid-user</directory >Alias /nagios "/usr/local/nagios/share" <Directory "/usr/local/nagios/share" > AuthType Basic Options None Allowoverride none order allow,deny allow from all AuthName "Nagios access" authuserfile /usr/local/nagios/etc/ htpasswd require Valid-user</directory>
3) Create Apache directory validation files
/usr/local/apache2/bin/htpasswd-c/usr/local/nagios/etc/htpassed ixdba start service/usr/local/apache2/bin/apachectl start http://ip/nagios/
Nagios Installation Steps