一、nagios安装:

1、安装下面命令:

这是本人监控服务时自己定义插件所用到的几个系统命令。可不安装。

(1)iostat:监控磁盘IO信息:

apt-getinstall sysstat

(2)ifstat:监控网络信息:

apt-getinstall ifstat

(3)gnuplot:画图:

apt-getinstall gnuplot

2、确保已经安装了下列软件包:

  • Apache2

  • PHP

  • GCCcompiler and development libraries

  • GD development libraries

假设没有安装,使用 apt-get
安装这些软件包,使用下面命令:

sudo apt-get install apache2

sudo apt-get install libapache2-mod-php5

sudo apt-get install build-essential

sudo apt-get install libgd2-dev
或者
sudo apt-get install libgd2-xpm-dev 3、创建用户信息:
成为 root用户。 创建一个nagios 用户并设置password:
/usr/sbin/useradd -m -s /bin/bash nagios passwd nagios

加入一个新的 nagcmd 组:

/usr/sbin/groupadd nagcmd

/usr/sbin/usermod -a -G nagcmd nagios

/usr/sbin/usermod -a -G nagcmd www-data

4、下载nagios及其插件:
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz
http://www.nagios.org/download/plugins/ 中下载nagios插件
这两个压缩包在 zctech 文件文件夹下已经下载好。 5、编译安装nagios

安装路径为 /usr/local/

cd/usr/local

将nagios-3.2.3.tar.gz复制到/usr/local下。之后解压缩:

tar xzf nagios-3.2.3.tar.gz

cd nagios-3.2.3

./configure --with-command-group=nagcmd

make all

make install

make install-init

make install-config

make install-commandmode

6、自己定义配置:

配置文件安装在 /usr/local/nagios/etc文件夹.

具体的配置在安装完毕之后加入服务时。

7、配置web界面

安装nagios web 配置文件:

make install-webconf

创建一个帐号登录web界面,记住password:

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

重新启动 Apache:

/etc/init.d/apache2 reload

8、编译安装
NagiosPlugins

安装路径为 /usr/local/

cd/usr/local

tar xzf nagios-plugins-2.0.3.tar.gz

cd nagios-plugins-2.0.3

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

make

make install

9、启动nagios

开机启动:

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

验证配置文件:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

假设没有错误,则启动 Nagios.

/etc/init.d/nagios start

10、登录web界面:
地址栏输入下面的网址。就可以登录。此时用到前面设置的帐号 ,比方nagiosadmin和password。 http://localhost/nagios/
登录成功则表示nagios成功安装。

nagios 安装配置(包含nrpe端)全 (一)的更多相关文章

  1. Nginx+nagios安装配置

    Nginx+nagios安装配置 [root@Nagios ~]# vi /etc/nginx/nginx.conf server { listen ; server_name localhost; ...

  2. nagios安装配置

     http://www.codeweblog.com/nagios%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/ 上线的服务器有时会被人攻击,导致服务不可用,今天安装配置了 ...

  3. CentOS6.5下的Nagios安装配置详解(图文)

    最近因为,科研需要,接触上了Nagios,这里,我将安装笔记做个详解.为自己后续需要和博友们学习! VMware workstation 11 的下载 VMWare Workstation 11的安装 ...

  4. Nagios安装配置教程(一)基本了解

    一.Nagios简介 Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows.Linux和Unix的主机状态, 交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信 ...

  5. nagios 安装配置(包含nrpe端)全 (三)

    四.系统的配置: 1.介绍 在配置过程中涉及到的几个定义有:主机.主机组,服务.服务组.联系人.联系人组,监控时间.监控命令等. 最重要的有四点: 第一:定义监控哪些主机.主机组.服务和服务组: 第二 ...

  6. nagios client 端的安装配置 以及 svr端对应的配置(转)

    1.下载安装包并解压 $ wget wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz$ wget http ...

  7. Nagios 安装配置

    ##Debian 6 安装server # apt-get install nagios* 一路设置好各种密码,成功后访问 http://ip/nagios3 既可,默认用户*nagiosadmin* ...

  8. centos6安装配置zabbix3主控端

    Centos 6.5 Zabbix 3.0.4 zabbix分为zabbix-server(主控端)和zabbix-agent(被控端),本文只介绍server: 安装mysql mysql建议使用5 ...

  9. 安装配置rsync服务端

    rsync是类unix系统下的数据镜像备份工具——remote sync.一款快速增量备份工具 Remote Sync,远程同步 支持本地复制,或者与其他SSH.rsync主机同步. rsync使用方 ...

随机推荐

  1. 118.类包装器与lambda函数包装器(伪函数实现)

    #include <iostream> #include <list> using namespace std; //函数包装器,左边参数右边函数 template<cl ...

  2. python多线程理解

    在发送网络请求的过程中,单个请求的速度总是有着很大的限制,而任务往往需要以更快的速度去执行,这时多线程就是一个很好地选择.python已经给我们封装好了多线程库thread和threading. th ...

  3. OR1200处理器中Wishbone总线接口模块WB_BIU介绍

    下面内容摘自<步步惊芯--软核处理器内部设计分析>一书 WB_BIU模块是OR1200处理器与外部Wishbone总线连接的接口模块.15.1节给出了WB_BIU模块的对外连接关系,并指出 ...

  4. 【VC编程技巧】窗口☞3.4利用bitmap改变对话框的背景。

    效果图: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbl9qaW50/font/5a6L5L2T/fontsize/400/fill/I0JBQ ...

  5. 关于exports 和 module.exports

    本文来源为node.js社区附上链接 http://cnodejs.org/topic/5231a630101e574521e45ef8 require 用来加载代码,而 exports 和 modu ...

  6. js中Array.prototype.push.call的用法

    var arr = [] Array.prototype.push.call(arr,"a","b","c") <==> []. ...

  7. Autoencoders and Sparsity(二)

    In this problem set, you will implement the sparse autoencoder algorithm, and show how it discovers ...

  8. PS:切图

    1.从psd中获取资源 2.基本了解 3.简单的图片操作和调整 4.对自己的审美提高一.界面设置: 1.新建设置:ctr+n; 预设:Web,大小Web(1920*1080) 背景:透明 2.移动工具 ...

  9. python自学群里遇到的小题汇总

    题目一: 请使在3秒内计算出一组的数据,偶数在奇数前(注意不使用for while等循环的方法)格式如下1,2,3,4,5,6,7,8,9,10输出结果是2,1,4,3,6,5,8,7,10,9 解决 ...

  10. split---将文件分割成多个小文件

    split命令可以将一个大文件分割成很多个小文件,有时需要将文件分割成更小的片段,比如为提高可读性,生成日志等. 选项 -b:值为每一输出档案的大小,单位为 byte. -C:每一输出档中,单行的最大 ...