Nagios Server-side installation
Base Kit rpm-q gcc glibc glibc-common gd gd-devel xinetd openssl-devel
Create user
Useradd-r Nagios
Mkdir/usr/local/nagios
Chown-r Nagios.nagios/usr/local/nagios
Installing Nagios
./configure--prefix=/usr/local/nagios
Make all
Make install
Make Install-init
Make Install-commandmode
Make Install-config
Add Nagios Service
Chkconfig--add Nagios
Chkconfig--level/Nagios
Installing Nagios-plugins
./configure--prefix=/usr/local/nagios
Make && make install
HTTP and PHP installation
Apache uses httpd-2.4.10.tar.gz.
We need apr-1.5.1.tar.gz and apr-util-1.5.4.tar.gz.
Tar XF httpd-2.2.23.tar.gz
Tar XF apr-1.5.1.tar.gz
Tar XF apr-util-1.5.4.tar.gz
Cp-r/home/apr-1.5.1 SRCLIB/APR
Cp-r apr-util-1.5.4 Httpd-2.4.10/srclib/apr-util
CD httpd-2.2.23
./configure--prefix=/usr/local/httpd--WITH-INCLUDED-APR
Make && make install
PHP Installation
./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs
HTTPD.CONF Configuration Modifications
Add AddType application/x-httpd-php. php
Installation Complete Modification httpd.conf
DirectoryIndex index.html changed to DirectoryIndex index.php index.html
Turn on the CGI module LoadModule cgid_module modules/mod_cgid.so
AddHandler Cgi-script. CGI
Add at the end
Scriptalias/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
Save exit
Create Apache directory validation files
/usr/local/apache2/bin/htpasswd-c/USR/LOCAL/NAGIOS/ETC/HTPASSWD Admin
Access Http://localhost/nagios to see Nagios's web interface