zoukankan      html  css  js  c++  java
  • centos下安装nagios

    摘要Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。

    Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。

    Nagios官方文档提供了详细的安装步骤,只要按照步骤一步一步安装还是非常容易的:

    1、关闭linux内核防火墙

    setenforce 0


    2、安装依赖包

    yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip  -y

    4、创建linux用户
    useradd nagios
    groupadd nagcmd
    usermod -a -G nagcmd nagios
    usermod -a -G nagcmd apache


    5、下载nagios core

    cd /tmp
    wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.1.1.tar.gz
    wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz


    7、解压nagios core

    tar zxf nagios-4.1.1.tar.gz
    tar zxf nagios-plugins-2.1.1.tar.gz
    cd nagios-4.1.1


    8、编译安装nagios core

    ./configure --with-command-group=nagcmd
    make all
    make install
    make install-init
    make install-config
    make install-commandmode
    make install-webconf


    9、创建web用户

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

    10、安装nagios-plugin
    cd /tmp/nagios-plugins-2.1.1
    ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
    make all
    make install


    11、启动httpd

    service httpd start

    systemctl start httpd


    12、启动nagios

    service nagios start

    systemctl start nagios

    12、设置防火墙
    firewall-cmd --zone=public --add-port=80/tcp --permanent
    firewall-cmd --reload

    13、浏览器访问,输入用户名nagiosadmin和刚才输入的密码

    b5fe695c303333b8d6a1f0e8f6060d557ad6f26d

    14、安装成功

  • 相关阅读:
    P4141 消失之物(退背包模板)
    P5829 【模板】失配树
    P4827 [国家集训队] Crash 的文明世界
    P4074 [WC2013]糖果公园
    P3242 [HNOI2015]接水果
    P2371 [国家集训队]墨墨的等式
    P4819 [中山市选]杀人游戏
    P5331 [SNOI2019]通信
    BZOJ1082 [SCOI2005]栅栏
    poj1475 Pushing Boxes[双重BFS(毒瘤搜索题)]
  • 原文地址:https://www.cnblogs.com/adjk/p/5318599.html
Copyright © 2011-2022 走看看