Nagios latest version installation under CentOS5.5

  
 

This article is a record of personal practice installation. When you install it, you can refer to the masterpieces of many masters on the Internet. Thank you very much!

Environment: Centos 5.5 32bitNagios 3.2.3nagios-plugin 1.4.15

1, Preparation: Required packages: httpd, php, gcc, glibc, gd, gd-devel# yum -y install gcc gd gd-devel httpd php set nagios user group /usr/sbin/useradd nagios for security settings nologin/usr/sbin/usermod -s /sbin/nologin nagios#create nagcmd group for use from web The interface executes an external command, adding nagios, apache to this group /usr/sbin/groupadd nagcmd/usr/sbin/usermod -G nagcmd nagios/usr/sbin/usermod -G nagcmd apache

2, download Source file and plugin cd /usr/local/srcwget [url]http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz[/url]wget [url]http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz[/url]

3, compile and install Nagios core: cd /usr/local/srctar xzf nagios -3.2.3.tar.gzcd nagios-3.2.3./configure –with-command-group=nagcmdmake allmake installmake install-initmake install-configmake install-commandmodemake install-webconf #automatically configure httpd.conf, generate text Save in /etc/httpd/conf.d/nagios.conf

4, install the plugin: tar xzf nagios-plugins-1.4.15.tar.gzcd nagios-plugins-1.4.15./configure – With-nagios-user=nagios –with-nagios-group=nagiosmakemake install

5. Configure a nagiosadmin user to log in to the nagios web interface htpasswd -c /usr/local/nagios/etc/htpasswd. Users nagiosadminservice httpd restart

6, change the E-mail address: vi /usr/local/nagios/etc/objects/contacts.cfg

7, set nagios, httpd boot chkconfig – Add nagioschkconfig nagios onchkconfig httpd on check if the configuration file is correct: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgservice nagios start Note: If you have selinux enabled, you need to configure the following two steps. :chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/chcon -R -t httpd_sys_content_t /usr/local/nagios/share/#If you don't want SElinux, you can also modify /etc/selinux/config to close it permanently. Setenforce 0

#So far, the basic installation has been completed! Open the browser to access Na Gios

http://ip/nagios

The follow-up will show you how to use Nagios to monitor Windows
, Linux and network devices, continue to pay attention to &hellip ;.

Copyright © Windows knowledge All Rights Reserved