1 安装libpcap
下载地址 http://www.tcpdump.org/#latest-release
解压
tar -zxvf libpcap-1.4.0.tar.gz
进入目录
cd libpcap-1.4.0
./configure
make
make install
yum install libpcap-devel.x86_64
2 安装ngrep
下载地址
git clone git://git.code.sf.net/p/ngrep/code ngrep-code
进入目录
cd ngrep-code
./configure --with-pcap-includes=/usr/local/include/pcap
make
make install