tcpdump: command not found-->yum install -y tcpdump

2021-02-20 IT知識免費共享

問題現像:

[root@itzsmfgx]# tcpdump -i eth0 -s 0 port 9999 -w firstTime0911.pcap

-bash: tcpdump: command not found

解決辦法:

[root@itzsmfgx]# yum install -y tcpdump

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: mirrors.cn99.com

 * extras: mirrors.163.com

 * updates: mirrors.cn99.com

base                                                                                                                                             | 3.6 kB  00:00:00     

docker-ce-stable                                                                                                                                 | 3.5 kB  00:00:00     

extras                                                                                                                                           | 2.9 kB  00:00:00     

mysql-connectors-community                                                                                                                       | 2.5 kB  00:00:00     

mysql-tools-community                                                                                                                            | 2.5 kB  00:00:00     

mysql57-community                                                                                                                                | 2.5 kB  00:00:00     

updates                                                                                                                                          | 2.9 kB  00:00:00     

Resolving Dependencies

--> Running transaction check

---> Package tcpdump.x86_64 14:4.9.2-4.el7_7.1 will be installed

--> Processing Dependency: libpcap >= 14:1.5.3-10 for package: 14:tcpdump-4.9.2-4.el7_7.1.x86_64

--> Processing Dependency: libpcap.so.1()(64bit) for package: 14:tcpdump-4.9.2-4.el7_7.1.x86_64

--> Running transaction check

---> Package libpcap.x86_64 14:1.5.3-12.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================

 Package                               Arch                                 Version                                            Repository                          Size

========================================================================================================================================================================

Installing:

 tcpdump                               x86_64                               14:4.9.2-4.el7_7.1                                 base                               422 k

Installing for dependencies:

 libpcap                               x86_64                               14:1.5.3-12.el7                                    base                               139 k

Transaction Summary

========================================================================================================================================================================

Install  1 Package (+1 Dependent package)

Total download size: 560 k

Installed size: 1.3 M

Downloading packages:

(1/2): libpcap-1.5.3-12.el7.x86_64.rpm                                                                                                           | 139 kB  00:00:01     

(2/2): tcpdump-4.9.2-4.el7_7.1.x86_64.rpm                                                                                                        | 422 kB  00:00:01     

---

Total                                                                                                                                   319 kB/s | 560 kB  00:00:01     

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : 14:libpcap-1.5.3-12.el7.x86_64                                                                                                                       1/2 

  Installing : 14:tcpdump-4.9.2-4.el7_7.1.x86_64                                                                                                                    2/2 

  Verifying  : 14:libpcap-1.5.3-12.el7.x86_64                                                                                                                       1/2 

  Verifying  : 14:tcpdump-4.9.2-4.el7_7.1.x86_64                                                                                                                    2/2 

Installed:

  tcpdump.x86_64 14:4.9.2-4.el7_7.1                                                                                                                                     

Dependency Installed:

  libpcap.x86_64 14:1.5.3-12.el7                                                                                                                                        

Complete!

相關焦點