ArticleDirectory
I. Software Packages
1. nagios-3.2.1.tar.gz
2. nagios-plugins-1.4.14.tar.gz
Ii. Installation Steps
1. useradd-M Nagios
2. groupadd nagcmd
3. usermod-a-g nagcmd Nagios
4. usermod-a-g nagcmd Apache
5. Tar zxvf nagios-3.2.1.tar.gz
6. CD nagios-3.2.1
7 ../configure-Prefix =/usr/local/Nagios-with-command-group = nagcmd -- With-httpd-conf =/usr/local/Apache/Conf
8. make install
9. make install-init
10. make install-config
11. make install-commandmode
12. Change email to your email address in VI/usr/local/Nagios/etc/objects/contacts. cfg
13. make install-webconf
14. htpasswd-C/usr/local/Nagios/etc/htpasswd. Users nagiosadmin // Add the nagiosadmin user and set the password
15. CD/usr/local/Apache/Conf
16. Copy the content in Nagios. conf to httpd. conf and put it at the end of httpd. conf.
17. CD/var/local/software
3. Tar zxvf nagios-plugins-1.4.14.tar.gz // install the Nagios plugin
18. CD nagios-plugins-1.4.14
19 ../configure -- prefix =/usr/local/Nagios-plus -- With-Nagios-user = Nagios -- With-Nagios-group = Nagios;
20. Make
21. make install
22. chkconfig-add Nagios
23. chkconfig Nagios on
24./usr/local/Nagios/bin/Nagios-V/usr/local/Nagios/etc/Nagios. cfg // test whether the Nagios configuration is correct.
25. Service Nagios start/stop
26. killall httpd
27./usr/local/Apache/bin/apachectl-K start
28. Access http: // localhost/Nagios and enter the nagiosadmin password.
29.
Iii. Nagios Configuration
1. Export _file =/usr/local/Nagios/etc/contactgroups. cfg // contact group configuration file path
Export _file =/usr/local/Nagios/etc/contacts. cfg // contact configuration file path
Export _file =/usr/local/Nagios/etc/hostgroups. cfg // host group configuration file path
Export _file =/usr/local/Nagios/etc/hosts. cfg // host configuration file path
Export _file =/usr/local/Nagios/etc/services. cfg // service configuration file path
Pai_file =/usr/local/Nagios/etc/timeperiods. cfg // path of the configuration file during monitoring period
English help manual: http://nagios-cn.sourceforge.net/nagios-cn/