快速业务通道

centos5.5 Linux安装nagios3.2.1总结

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-05
;ts=1282636582&mirror=cdnetworks-kr-2


成功下载两个Nagios的tar包:

nagios-3.2.1.tar.gz
nagios-plugins-1.4.15.tar.gz


展开tar包:

tar -zxvf nagios-3.2.1.tar.gz

tar -zxvf nagios-plugins-1.4.15.tar.gz

进入nagios安装目录开始编译安装nagios软件


cd nagios-3.2.1


./configure --with-command-group=nagcmd ***编译Nagios程序包源码


make all

make install

make install-init **生成init启动脚本

make install-config **设置相应的目录权限

make install-commandmode **生成模板配置文件

make install-webconf **生成apache配置文件

使用htpasswd 命令创建nagios的Web接口访问用户名和密码.


[root@NagiosTestetc]# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Newpassword:

Re-type newpassword:


[root@NagiosTest~]# cat /usr/local/nagios/etc/htpasswd.users

nagiosadmin:5DV3J8lr7mUJ6 **密码已经加密了

接下来开始编译安装nagios的插件.

cdnagios-plugins-1.4.15

./configure--with-nagios-user=nagios --with-nagios-group=nagios

make

make install

将nagios加到服务列表中并使之在系统启动时自动启动

chkconfig --add nagios

chkconfig nagios on

chkconfig --list nagios

nagios 0:off 1:off 2:on 3:on 4:on 5:on 6:off


验证配置文件,如果没有报错说明安装正确.


[root@NagiosTestnagios-plugins-1.4.15]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg


Nagios Core3.2.1

Copyright(c) 2009-2010 Nagios Core Development Team and Community Contributors

Copyright (c)1999-2009 Ethan Galstad

LastModified: 03-09-2010

License:GPL


Website:http://www.nagios.org

Readingconfiguration data...


Read main config file okay...

Processingobject config file ''/usr/local/nagios/etc/objects/commands.cfg''...

Processingobject config file ''/usr/local/nagios/etc/objects/contacts.cfg''...

Processingobject config file ''/usr/local/nagios/etc/objects/timeperiods.cfg''...

Processingobject config file ''/usr/local/nagios/etc/objects/templates.cfg''...

Processingobject config file ''/usr/local/nagios/etc/objects/localhost.cfg''...


Read object config files okay...


Runningpre-flight check on configuration data...


Checkingservices...


Checked 8 services.

Checkinghosts...


Checked 1 hosts.

Checkinghost groups...


Checked 1 host groups.

Checkingservice groups...


Checked 0 service groups.

Checkingcontacts...


Checked 1 contacts.

Checkingcontact groups...


Checked 1 contact groups.

Checkingservice escalations...


Checked 0 service escalations.

Checkingservice dependencies...


Checked 0 service dependencies.

Checkinghost escalations...


Checked 0 host escalations.

Checkinghost dependencies...


Checked 0 host dependencies.

Checkingcommands...


Checked 24 commands.

Checkingtime periods...


Checked 5 time periods.

Checkingfor circular paths between hosts...

Checkingfor circular host and service dependencies...

Checkingglobal event handlers...

Checkingobsessive compulsive proc

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号