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、安装成功

  • 相关阅读:
    期末考试结束啦!!!
    【sdut2878】Circle
    【HDU4035】Maze
    【ZOJ3329】One Person Game
    【POJ2151】Check the difficulty of problems
    【CodeForces148D】Bag of mice
    【POJ2096】Collecting Bugs
    【HDU3853】LOOPS
    【HDU4405】Aeroplane_chess
    「Luogu P5826 【模板】子序列自动机」
  • 原文地址:https://www.cnblogs.com/adjk/p/5318599.html
Copyright © 2011-2022 走看看