zoukankan      html  css  js  c++  java
  • Redhat Nagios安装详解

    一、软件包

    1. nagios-3.2.1.tar.gz

    2. nagios-plugins-1.4.14.tar.gz

    二、安装步骤

    1. useradd –m nagios

    2. groupadd nagcmd

    3. usermod –a –G nagcmd nagios

    4. usermod –a –G nagcmd apache

    5. tar zxvf nagios-3.2.1.tar.gz

    6. cd nagios-3.2.1

    7. ./configure –prefix=/usr/local/nagios –with-command-group=nagcmd --with-httpd-conf=/usr/local/apache/conf

    8. Make install

    9. Make install-init

    10. Make install-config

    11. Make install-commandmode

    12. Vi /usr/local/nagios/etc/objects/contacts.cfg修改email为你的EMAIL地址

    13. Make install-webconf

    14. Htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin //增加nagiosadmin用户并设置密码

    15. cd /usr/local/apache/conf

    16. 拷贝nagios.conf中的内容到httpd.conf中,放在httpd.conf最后

    17. Cd /var/local/software

    3. Tar zxvf nagios-plugins-1.4.14.tar.gz//安装nagios插件

    18. Cd nagios-plugins-1.4.14

    19. ./configure --prefix=/usr/local/nagios-plus --with-nagios-user=nagios --with-nagios-group=nagios;

    20. Make

    21. Make install

    22. Chkconfig –add nagios

    23. Chkconfig nagios on

    24. /usr/local/nagios/bin/nagios –v /usr/local/nagios/etc/nagios.cfg//测试nagios配置是否正确

    25. Service nagios start/stop

    26. Killall httpd

    27. /usr/local/apache/bin/apachectl –k start

    28. 访问http://localhost/nagios输入nagiosadmin密码 nagiosadmin设置的密码

    29. clip_image002

    三、Nagios配置

    1. cfg_file=/usr/local/nagios/etc/contactgroups.cfg  //联系组配置文件路径

    cfg_file=/usr/local/nagios/etc/contacts.cfg //联系人配置文件路径

    cfg_file=/usr/local/nagios/etc/hostgroups.cfg //主机组配置文件路径

    cfg_file=/usr/local/nagios/etc/hosts.cfg //主机配置文件路径

    cfg_file=/usr/local/nagios/etc/services.cfg //服务配置文件路径

    cfg_file=/usr/local/nagios/etc/timeperiods.cfg //监视时段配置文件路径

    中文版帮助手册:http://nagios-cn.sourceforge.net/nagios-cn/

  • 相关阅读:
    [JOYOI1326] 剑人合一
    linux hive +mysql(mysql用于hive元数据存储)
    hadoop 伪分布式单机部署练习hive
    pyhton 操作hive数据仓库
    python操作hadoop HDFS api使用
    hadoop伪集群部署
    python 文件指针切割文件
    jdk8 permgen OOM再见迎来metaspace
    java JVM内存区域模型
    java垃圾回收
  • 原文地址:https://www.cnblogs.com/witer666/p/1767380.html
Copyright © 2011-2022 走看看