centOS下安装iftop(流量监控)图解
第一种方法:
yum install iftop
第二种方法:
转自https://www.landui.com/help/show-7748.html
1.远程连接后下载iftop
wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz

2.解压
tar zxvf iftop-0.17.tar.gz

3.配置./configure
./configure

报错,此时若继续运行
make && make install
会报错

也即是说,在执行./configure后没有生成makefile是无法继续编译的,必须解决后方可继续
看执行./configure的报错原因是 You’re not going to get very far without libpcap.没有安装libpcap,于是解决方法就是安装libpcap
命令:
yum install -y libpcap-devel

此时报错Cannot retrieve metalink for repository: epel,这个错误表明你需要更新CA证书了
解决方法:输入命令
yum –disablerepo=epel -y update ca-certificates

之后就可以开始运行
#yum install -y libpcap-devel
安装所需库了

安装完成后继续运行
./configure
,报错

解决方法:
输入命令
yum install ncurses-devel

安装完成后再次运行./configure,这次不再出错

成功生成Makefile

编译安装,命令
make && make install

安装完成,输入命令cd返回

使用iftop命令查看流量

按q退出


浙公网安备 33010602011771号