135-1821-9792

nagios如何安装

这篇文章将为大家详细讲解有关nagios如何安装,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

创新互联公司是一家专注于成都网站制作、成都网站建设与策划设计,吉安网站建设哪家好?创新互联公司做网站,专注于网站建设十余年,网设计领域的专业建站公司;建站业务涵盖:吉安等地区。吉安做网站价格咨询:18982081108

nagios的功能:使用web网页进行监控其他服务器状态的工具

组成:
nagios Core ,即核心模块,不做具体的监视工作
Plugins, 与核心模块进行组合,进而实现对某个具体的对象监控
     
     
工作对象:
1、主机,交换机,路由器,虚拟机
2、服务/资源
3、联系人
4、时段
5、命令

安装:
# yum -y install httpd gcc glibc glibc-common gd gd-devel php php-MySQL mysql mysql-server mysql-devel
创建组和用户
# groupadd -r nagcmd
# useradd -G nagcmd -r -s /sbin/nologin nagios
# echo 'redhat' | passwd --stdin nagios &> /dev/null
# usermod -a -G nagcmd apache

# tar zxf nagios-3.3.1.tar.gz
# cd nagios
编译安装:
# ./configure --sysconfdir=/etc/nagios --with-command-group=nagcmd --enable-event-broker --prefix=/usr/local/nagios
# make all
# make install
# make install-init
# make install-commandmode
# make install-config
# make install-webconf

修改 nagios 的默认联系人;(如果监控的服务器坏掉了要找的人)
# vim /etc/nagios/objects/contacts.cfg
email nagios@localhost

创建 nagios 监控服务的 web 接口的管理员;
# htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
# cat /etc/httpd/conf.d/nagios.conf

# tar axf nagios-plugins-1.4.15.tar.gz
# cd nagios-plugins-1.4.15

编译安装选项:
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-mysql
# make && make install

# chown -R nagios.nagcmd /etc/nagios
# chown -R apache.nagcmd /etc/httpd
# chown -R nagios.nagcmd /usr/local/nagios
# chkconfig --add nagios
# chkconfig nagios on
# service nagios start
#service httpd start

关闭setenforce和context值:
# setenforce 0
# chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin
# chcon -R -t httpd_sys_content_t /usr/local/nagios/share

关于“nagios如何安装”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。


当前标题:nagios如何安装
文章分享:http://kswsj.com/article/ghgogs.html

其他资讯



Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号