源代码编译安装Nagios
先决条件:[*]Apache
[*]PHP
[*]GCC
[*]GD development libraries
安装方法:
yum install httpd php
yum install gcc glibc glibc-common
yum install gd gd-devel
1、创建运行nagios的用户账户并设置密码
useradd -m nagios
passwd nagios
创建组,并把nagios账户和apache账户加入该组
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
2、编译并安装Nagios
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
3、自定义配置
主配置文档:/usr/local/nagios/etc/nagios.cfg
联系人配置文档:/usr/local/nagios/etc/objects/contacts.cfg
4、配置web服务器接口:
make install-webconf
添加用户(Apache认证时用)
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Service httpd restart
5、安装Nagios插件:
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
6、启动Nagios:
chkconfig nagios –add
chkconfig nagios on
service nagios s tart
7、通过网页登录:
http://localhost/nagios/
参考文档:
http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html
页:
[1]