您好,欢迎来到欧得旅游网。
搜索
您的当前位置:首页Ubuntu12.0.4安装nagios3.2.3中文

Ubuntu12.0.4安装nagios3.2.3中文

来源:欧得旅游网

Nagios是一款开源的系统和网络监控应用,它可以监视你指定的主机与服务,当出现问题时提醒您以帮助你改善系统。 Nagios最初在Linux下运行,但它大多数其他Unix下运行。 Nagios 功能包括: 监控网络服务( SMTP , POP3 , HTTP , NNTP , PING等) 监控主机

Nagios是一款开源的系统和网络监控应用,它可以监视你指定的主机与服务,当出现问题时提醒您以帮助你改善系统。 Nagios最初在Linux下运行,但它大多数其他Unix下运行。

Nagios 功能包括:

  • 监控网络服务( SMTP , POP3 , HTTP , NNTP , PING等)
  • 监控主机资源(处理器负载,磁盘使用情况等)
  • 简单的插件设计,让用户能够轻松开发自己的服务检查
  • 并行化服务检查
  • 定义网络主机层次结构使用“父”的主机,使检测和区分主机
  • 当服务或主机发生问题是通知你(通过电子邮件,寻呼机或用户定义的方法)
  • 定义事件处理程序能力,服务或主机运行过程中主动解决问题
  • 日志文件
  • 支持执行冗余监控主机
  • 可选Web界面查看当前网络状态,通知和问题历史,日志文件等。
  • 在安装之前你最好已经安装了lamp服务器软件,另外你还需要安装一些依赖包,使用下面的命令:

    sudo apt-get install wget build-essential php5-gd wget libgd2-xpm libgd2-xpm-dev libapache2-mod-php5 apache2-utils daemon

    下载Nagios及插件:

    wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
    wget http://nchc.dl.sourceforge.net/project/nagios-cn/sourcecode/zh_CN%203.2.3/nagios-cn-3.2.3.tar.bz2
    wget http://nchc.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz

    添加 Nagios 用户和群组

    adduser nagios
    /usr/sbin/groupadd nagcmd
    /usr/sbin/usermod -G nagcmd nagios
    /usr/sbin/usermod -G nagcmd www-data

    现在安装 nagios

    尽量使用 root 身份登录,运行以下命令

    解压缩下载的文件(Nagios的内核和插件)

    1、Nagios内核安装:

    tar zxvf nagios-3.2.3.tar.gz
    tar zxvf nagios-plugins-2.0.3.tar.gz
    cd nagios-3.2.3/
    apt-get install sendmail
    ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/sbin/sendmail
    make all
    make install
    make install-init
    make install-commandmode
    make install-config
    make install-webconf
    cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
    chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
    /etc/init.d/nagios start

    2、插件安装
    cd ..
    cd nagios-plugins-2.0.3/
    ./configure --with-nagios-user=nagios --with-nagios-group=nagios
    make
    make install
    ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
    apt-get install libxml2
    apt-get install libxml2-dev
    sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
    sudo touch /var/www/test.php
    vim /var/www/test.php
    sudo apt-get install php5-gd php5-curl php5-xdebug
    sudo /etc/init.d/nagios restart

    3、安装中文插件
    cd ..
    tar xvf nagios-cn-3.2.3.tar.bz2
    cd nagios-cn-3.2.3/
    ./configure --with-nagios-user=nagios --with-nagios-group=nagios
    make all
    make
    make install
    make install-init
    make install-commandmode
    make install-config
    htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

    sudo /etc/init.d/nagios restart

    访问nagios地址:http://localhost/nagios




    Copyright © 2019- ovod.cn 版权所有 湘ICP备2023023988号-4

    违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

    本站由北京市万商天勤律师事务所王兴未律师提供法律服务