1.官网下载tcpdump和libpcap压缩包
登录:https://www.tcpdump.org/index.html#latest-releases
2.安装相关依赖库
1)yum -y install gcc-c++;
2)yum -y install flex;
3)yum -y install bison;
3.安装libpcap库(libpcap与tcpdump有依赖,需先安装)
tar -zxvf libpcap-1.10.1.tar.gz;
cd libpcap-1.10.1;
./configure;
make;
make install;
4.安装tcpdump
tar -zxvf tcpdump-4.99.1.tar.gz;
cd tcpdump-4.99.1;
./configure;
make;
make install;