安装iftop

本文详细记录了在Linux环境下安装iftop流量监控工具的过程。包括解决安装libpcap时遇到的lex和yacc缺失问题,以及iftop配置过程中关于Curses库的支持问题。

Linux还真不是什么好玩的,但是既然新浪都用Linux+nginx+php+mysql的架构,我们有什么理由不用呢?瞄着成功者的架构走,虽然辛苦,总是不会错。

今天没别的,先解决流量监控的问题吧,网上搜来搜去,先用iftop吧,以后有好的,再学习,今天先安装一个用着,路只能是走出来的。

闲话少说,安装iftop吧

官方网站:

http://www.ex-parrot.com/~pdw/iftop/

 

安装iftop,,必须先安装libpcap

http://www.tcpdump.org/release/

 

wget http://www.tcpdump.org/release/libpcap-0.9.8.tar.gz

tar -zxvf libpcap-0.9.8.tar.gz

cd libpcap-0.9.8

./configure

make;makeinstall

遇到问题:1、./configure时报错

configure: error: Youroperating system's lex is insufficient to compile

 libpcap. flex is a lex replacement that has many advantages, including

 being able to compile libpcap.  For more information, see

 http://www.gnu.org/software/flex/flex.html .

  原来是flex没有安装,需要安装flex

  yum -y install flex

 2、make时报错

yacc:Command not found

继续安装byyacc

yuminstall byacc


pcap安装完成,再来安装iftop

wgethttp://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz

tar zxvf iftop-0.17.tar.gz

cd iftop-0.17

./configure

make;make install

ok


新问题,iftop ./configue时报错configure: error: Curses! Foiled again!

安装Curses:yum install ncurses-devel


configure: error: Curses! Foiled again!

 

(Can't find a curses library supporting m

vchgat.) 

Consider installing ncurses.



configure: error: Curses! Foiled again!

 

(Can't find a curses library supporting m

vchgat.) 

Consider installing ncurses.



configure: error: Curses! Foiled again!

 

(Can't find a curses library supporting m

vchgat.) 

Consider installing ncurses.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值