• Install and configure iftop


    How to install iftop on Unix/Linux server?
    The command “iftop” is using for bandwidth (BW) monitoring on a server. It is simple to monitor a server BW with iftop command.

    You can analyse the incoming and outgoing packets using iftop tool. This is very useful to analyse network outages or some kind of network level attacks. In this article, I am sharing the steps to install this tool on your Linux box.

    How to install iftop on my server?
    Ya… Its really simple to install iftop on your Unix/Linux server. The following steps will help you to install iftop.

    ssh to your server---->

    [root@server]# wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz
    [root@server]# tar -zxvf iftop-0.17.tar.gz
    [root@server]# cd iftop-0.17
    [root@server]# ./configure

    For a fresh server you may get an error like this 🙁 don’t worry about that,



    checking for gawk… gawk
    checking whether make sets ${MAKE}… no
    checking for gcc… no
    checking for cc… no
    checking for cc… no
    checking for cl… no
    configure: error: no acceptable C compiler found in $PATH
    That means server needs gcc for compilation

    安装gcc。

    在线方法:

    [root@server]# yum install gcc
    Again run this
    
    • 1
    • 2

    离线方法:
    下载gcc,gcc-4.8.5-44.el7.x86_64.rpm
    cpp-4.8.5-44.el7.x86_64.rpm
    参考 inux离线安装gcc等依赖包

    [root@CentOS-1 home]#rpm -ivh mpfr-3.1.1-4.el7.x86_64.rpm
    [root@CentOS-1 home]#rpm -ivh libmpc-1.0.1-3.el7.x86_64.rpm
    [root@CentOS-1 home]#rpm -ivh kernel-headers-3.10.0-862.el7.x86_64.rpm
    [root@CentOS-1 home]#rpm -ivh glibc-headers-2.17-222.el7.x86_64.rpm
    [root@CentOS-1 home]#rpm -ivh glibc-devel-2.17-222.el7.x86_64.rpm
    [root@CentOS-1 home]#rpm -ivh cpp-4.8.5-28.el7.x86_64.rpm
    [root@CentOS-1 home]#rpm -ivh gcc-4.8.5-28.el7.x86_64.rpm
    或者
    rpm  -ivh  *.rpm --nodeps --force
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    [root@server]# ./configure


    checking how to call gethostbyaddr_r… 8 args, int return
    checking gethostbyaddr_r usability… yes
    checking where to find pcap.h… no idea
    configure: error: can’t find pcap.h
    You’re not going to get very far without libpcap.

    安装libpcap。
    在线方法:

    [root@server]# yum -y install libpcap libpcap-devel
    
    • 1

    离线方法:
    下载 libpcap-0.9.4-8.1.i386.rpm 和 libpcap-devel-0.9.4-8.1.i386.rpm
    下载仓库
    安装 rpm -ivh *.rpm --nodeps --force

    [root@server]# ./configure


    checking pcap.h presence… yes
    checking for pcap.h… yes
    checking for a curses library containing mvchgat… none found
    configure: error: Curses! Foiled again!
    (Can’t find a curses library supporting mvchgat.)
    Consider installing ncurses.

    [root@server]# yum -y install ncurses ncurses-devel
    
    • 1

    下载 libpcap-0.9.4-8.1.x86_64.rpm 和 libpcap-devel-0.9.4-8.1.x86_64.rpm
    下载仓库
    安装 rpm -ivh *.rpm --nodeps --force

    [root@server]# ./configure
    [root@server]# make
    [root@server]# make install

    安装iftop 完成
    Install and configure iftop (network analyser) – Unix/Linux

  • 相关阅读:
    springboot+jsp项目校园外卖配送系统
    大数据时代精准营销是提升品牌竞争力的核心
    Redis的数据类型以及应用场景
    计算机专业应该学哪些课程?或许我们还有更大的进步空间
    excel排序没有 扩展选定区域
    基于linux开发的实现类似unix的文件系统
    王坚院士:云计算与 GPT 的关系,就是电和电动机的关系
    【C++】模板初阶 | STL简介
    借助 DevChat AI 之力,成就我之全栈梦想
    D如何检查null
  • 原文地址:https://blog.csdn.net/weixin_32820767/article/details/125423195