需要预先安装的工具:
- flex
yum -y install flex
- bison
yum -y install bison
下载安装包并安装,官网下载地址https://www.tcpdump.org/:
wget http://www.tcpdump.org/release/libpcap-1.5.3.tar.gz
wget http://www.tcpdump.org/release/tcpdump-4.5.1.tar.gz
tar -zxvf libpcap-1.5.3.tar.gz
cd libpcap-1.5.3
./configure
make && make install
cd ..
tar -zxvf tcpdump-4.5.1.tar.gz
cd tcpdump-4.5.1
./configure
make && make install
查看版本
tcpdump --version