[原] Installing Nagios 4.0.5 on nginx and Ubuntu 12.04

Nagios® Core™ is an Open Source system and network monitoring application. It watches hosts and services that you specify, alerting you when things go bad and when they get better.Nagios Core was originally designed to run under Linux, although it should work under most other unices as well.

以下是2014-4-17安装记录:

== 服务端 ==

安装依赖包:(其实不装也能安装成功,就是部分功能会disabled)

用户组:

从 http://www.nagios.org/download/ 下载解压:

编译安装:

建立htpasswd.users,这个如果装了apache2有htpasswd这个命令,不然可以用某个python脚本:
(如果服务器不想装python,可以找台有python的服务器;或者找台装了apache的机器运行htpasswd;或者装个httpd不启动也没关系)
(生成的htpasswd.users是个文本文件,复制到服务器的 /etc/nagios/htpasswd.users)

修改联系人email,在contacts.cfg的email那里(34行)

安装mail报警通知所需包(安装时选择”Internet Site”;输入域名)
(注意:不装这个mail包编译nagios-plugins-2.0.1会error,但是编译nagios-plugins-2.0没问题。。。)

安装插件:

启动nagios

安装fcgi

编辑nginx.conf

其中对/nagios/开头的地址进行了rewrite,(nagios内部很多页面是写死/nagios/开头的,导致images、css等出不来)

启动服务

登录后就看到nagios的监控界面了

发表评论