安装iftop

来源:互联网 发布:域名注册多少钱 编辑:程序博客网 时间:2024/05/29 08:06

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.


原创粉丝点击