zoukankan      html  css  js  c++  java
  • Linux服务器---流量监控ntop

    Ntop

    Ntop 是一款类似于sniffer的流量监控工具,它显示出的流量信息比mrtg更加详细。

    1 、安装一些依赖软件

    [root@localhost bandwidthd]#  yum install -y gcc libpcap-devel libpcap libtool automake autoconf gdbm gdbm-devel libevent libevent-devel rrdtool rrdtool-devel zlib zlib-devel

    2 、安装geoip软件,此软件有多个依赖,可以在 https://centos.pkgs.org 下载。几个rpm包要同时安装

    [root@localhost wj]#  rpm -ivh GeoIP-1.6.9-2857.el6.art.i686.rpm GeoIP-GeoLite-data-2017.05-1.el6.art.noarch.rpm GeoIP-GeoLite-data-extra-2017.05-1.el6.art.noarch.rpm geoipupdate-2.2.2-2.el6.art.i686.rpm 

    Preparing...               ########################################### [100%]

       1:GeoIP-GeoLite-data-extr########################################### [ 25%]

       2:GeoIP-GeoLite-data    ########################################### [ 50%]

       3:geoipupdate           ########################################### [ 75%]

       4:GeoIP                 ########################################### [100%]

     

    3 、下载ntop软件( https://sourceforge.net/projects/ntop/files/ntop/ntop-4.0.1/ntop-4.0.1.tar.gz/download 

    4 、解压bandwidthd。

    [root@localhost ~]#  tar -xzvf ntop-4.0.1.tar.gz

    5 、安装。ntop需要进行编译安装,首先要执行autogen.sh文件,生成makefile,然后在编译、安装

    [root@localhost ntop-4.0.1]# ./autogen.sh

    [root@localhost ntop-4.0.1]# make

    [root@localhost ntop-4.0.1]# make install

    6 、配置防火墙,增加tcp的3000端口

    [root@localhost GeoIP-1.4.8]#  gedit /etc/sysconfig/iptables

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT

     

    [root@localhost GeoIP-1.4.8]# service iptables restart

    iptables :将链设置为政策  ACCEPT : filter nat                [ 确定 ]

    iptables :清除防火墙规则:                                  [ 确定 ]

    iptables :正在卸载模块:                                    [ 确定 ]

    iptables :应用防火墙规则:                                  [ 确定 ]

    iptables :载入额外模块: nf_conntrack_ftp                   [ 确定 ]

    7 、启动ntop

    [root@localhost GeoIP-1.4.8]#  /usr/local/bin/ntop -d -L -u root -P /usr/local/var/ntop --skip-version-check --use-syslog=daemon

    8 、在浏览器输入“127.0.0.1:3000”打开ntop。

     

  • 相关阅读:
    OC3(字符串,值类)
    OC2(初始化方法)
    OC1(类和对象)
    postgresql 时间戳格式为5分钟、15分钟
    centos添加ftp用户并禁止外切目录
    postgresql 判断日期是否合法
    tigerVNC的简单使用教程(CentOS的远程桌面连接)
    linux awk解析csv文件
    由windows向linux上传下载文件方法
    codeblocks linux编译告警乱码解决办法
  • 原文地址:https://www.cnblogs.com/wj78080458/p/10280404.html
Copyright © 2011-2022 走看看