欢迎来到天天文库
浏览记录
ID:40563771
大小:62.50 KB
页数:12页
时间:2019-08-04
《nagios安装与配置》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、linux_nagios服务端:yuminstallhttpd php1.添加账户和组:useraddnagiosgroupaddnagcmdusermod-Gnagcmdnagiosusermod-Gnagcmdapache2.安装nagios:tarzxvfnagios-3.2.0.tar.gz-C/usr/local/src/cd/usr/local/src/nagios-3.2.0/./configure--with-nagios-group=nagcmd --prefix=/usr/local/nagios #有的写 --with-command-gr
2、oup=nagcmd 我做实验时没这么写makeallmakeinstallmakeinstall-initmakeinstall-configmakeinstall-commandmodemakeinstall-webconf3.安装插件nagios-plugins-1.4.14.tartarzxvfnagios-plugins-1.4.14.tarcd/nagios-plugins-1.4.14./configure--with-nagios-user=nagios--with-nagios-group=nagiosmakemakeinstall4.安装htt
3、pd,如果安装nagios之前用yum安装了httpd,则不用改httpd的配置文件。如果在安装nagios之后才用yum安装的httpd 或编译安装的httpd:则在 /etc/httpd/conf/httpd.conf后面加入以下内容:vim/httpd.conf#settingfornagiosScriptAlias/nagios/cgi-bin/usr/local/nagios/sbin AuthTypeBasic OptionsExecCGI AllowOverri
4、deNone Orderallow,deny Allowfromall AuthName"NagiosAccess" AuthUserFile/usr/local/nagios/etc/htpasswd.users Requirevalid-user Alias/nagios/usr/local/nagios/share AuthTypeBasic OptionsNone AllowOverrideNone Orderallow,deny A
5、llowfromall AuthName"nagiosAccess" AuthUserFile/usr/local/nagios/etc/htpasswd.users Requirevalid-user :wq/usr/local/apache/bin/apachctl–t #检查APACHE的配置文件有无语法错误5.htpasswd-c/usr/local/nagios/etc/htpasswd.usersnagiosadmin #给nagios访问网页加用户6.设置邮件联系人 yuminstall
6、sendmailm4mailxvim/usr/local/nagios/etc/objects/contacts.cfg definecontact{ contact_name nagiosadmin ;Shortnameofuser use generic-contact ;Inheritdefaultvaluesfromgeneric-contacttemplate(definedabove) alias NagiosAdmin ;Fullname
7、ofuser email xxxxxxxxxxx@139.com ;<<*****CHANGETHISTOYOUREMAILADDRESS****** service_notification_period 24x7 host_notification_period 24x7 service_notification_options w,u,c,r,f,s host_notification_options d,u,r,f,s service_notification_commands n
8、otify
此文档下载收益归作者所有