Cacti+Nagios整合安装部署新版文档格式.docx
- 文档编号:15796419
- 上传时间:2022-11-16
- 格式:DOCX
- 页数:17
- 大小:688.27KB
Cacti+Nagios整合安装部署新版文档格式.docx
《Cacti+Nagios整合安装部署新版文档格式.docx》由会员分享,可在线阅读,更多相关《Cacti+Nagios整合安装部署新版文档格式.docx(17页珍藏版)》请在冰豆网上搜索。
∙允许用户通过设计实现简单的插件来监控自己特定的服务
∙当被监控对象出现问题时,会及时通知管理人员
∙事先定义事件处理程序,当对象出现问题时自动调用对应的处理程序
∙通过web页面来监视对象状态,警告提示和日志文件。
需要安装软件列表:
php-devel-5.1.6-23.2.el5_3.i386.rpm
php-json-ext-1.2.1.tar.bz2
cacti-plugin-0.8.7e-PA-v2.6.zip
nagios-3.2.1.tar.gz
nagios-plugins-1.4.14
ndoutils-1.4b9.tar.gz
npc-2.0.4.tar.gz
Nagios安装
[root@cacti-qmailsoft]#wget
[root@cacti-qmailsoft]#tar-zxvfnagios-3.2.1.tar.gz
[root@cacti-qmailsoft]#cdnagios-3.2.1
[root@cacti-qmailnagios-3.2.1]#./configure--prefix=/usr/local/nagios
[root@cacti-qmailnagios-3.2.1]#makeall
输入makeall得到下面具体信息
==============================================================
***Compilefinished***
IfthemainprogramandCGIscompiledwithoutanyerrors,you
cancontinuewithinstallingNagiosasfollows(type'
make'
withoutanyargumentsforalistofallpossibleoptions):
makeinstall
-Thisinstallsthemainprogram,CGIs,andHTMLfiles
使用makeinstall来安装主程序,CGI和HTML文件
makeinstall-init
-Thisinstallstheinitscriptin/etc/rc.d/init.d
使用makeinstall-init在/etc/rc.d/init.d安装启动脚本
makeinstall-commandmode
-Thisinstallsandconfigurespermissionsonthe
directoryforholdingtheexternalcommandfile
使用makeinstall-commandmode来配置目录权限
makeinstall-config
-Thisinstalls*SAMPLE*configfilesin/usr/local/nagios/etc
You'
llhavetomodifythesesamplefilesbeforeyoucan
useNagios.
ReadtheHTMLdocumentationformoreinfo
ondoingthis.
Payparticularattentiontothedocson
objectconfigurationfiles,astheydeterminewhat/how
thingsgetmonitored!
使用makeinstall-commandmode来安装示例配置文件,安装的路径是/usr/local/nagios/etc
makeinstall-webconf
-ThisinstallstheApacheconfigfilefortheNagios
webinterface
使用makeinstall-webconf来安装apache的配置文件
=================================================================
makeinstall在安装这个动作之前要增加一个nagios用户,并修改它的权限,不然会出现以下错误:
cd./base&
&
makeinstall
make[1]:
Enteringdirectory`/home/yahoon/nagios/nagios-2.9/base'
makeinstall-basic
make[2]:
/usr/bin/install-c-m775-onagios-gnagios-d/usr/local/nagios/bin
/usr/bin/install:
invaliduser`nagios'
非法用户nagios
***[install-basic]Error1
Leavingdirectory`/home/yahoon/nagios/nagios-2.9/base'
***[install]Error2
make:
=====================================================================
[root@cacti-qmailnagios-3.2.1]#useraddnagios
[root@cacti-qmailnagios-3.2.1]#mkdir/usr/local/nagios
[root@cacti-qmailnagios-3.2.1]#chownnagios.nagios/usr/local/nagios
[root@cacti-qmailnagios-3.2.1]#makeinstall;
makeinstall-init;
makeinstall-commandmode;
makeinstall-config;
验证程序是否被正确安装
切换目录到安装路径(这里是/usr/local/nagios),看是否存在etc、bin、sbin、share、var这五个目录,如果存在则可以表明程序被正确的安装到系统了。
后表是五个目录功能的简要说明:
binNagios执行程序所在目录,nagios文件即为主程序
etcNagios配置文件位置,初始安装完后,只有几个*.cfg-sample文件
sbinNagiosCgi文件所在目录,也就是执行外部命令所需文件所在的目录
ShareNagios网页文件所在的目录
VarNagios日志文件、spid等文件所在的目录
修改nagios页面文件
[root@cacti-qmailnagios-3.2.1]#more/etc/httpd/conf/nagios.conf
#SAMPLECONFIGSNIPPETSFORAPACHEWEBSERVER
#LastModified:
11-26-2005
#
#Thisfilecontainsexamplesofentriesthatneed
#tobeincorporatedintoyourApachewebserver
#configurationfile.
Customizethepaths,etc.as
#neededtofityoursystem.
ScriptAlias/nagios/cgi-bin"
/usr/local/nagios/sbin"
<
Directory"
>
#
SSLRequireSSL
OptionsExecCGI
AllowOverrideNone
Orderallow,deny
Allowfromall
Orderdeny,allow
Denyfromall
Allowfrom127.0.0.1
AuthName"
NagiosAccess"
AuthTypeBasic
AuthUserFile/usr/local/nagios/etc/htpasswd.users
Requirevalid-user
/Directory>
Alias/nagios"
/usr/local/nagios/share"
OptionsNone
Au
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Cacti Nagios 整合 安装 部署 新版