CentOS安装tshark抓包工具
准备在服务器上用tshark抓包,分析一下数据。直接yum install tshark却发现没有这个包。网上搜索一下,各种奇葩安装方式,又是安装apt?又是安装各种环境?我相信既然CentOS已经有了yum这么好的包管理工具,那么一定有更简单的方式。
最后只好在Google上直接用我这蹩脚的英文搜索一下。果然,一句how to install tshark on centos顺利解决了我的问题。
原来一直是自己对yum这个命令了解太少了,平时只会yum install,yum update :first_quarter_moon_with_face: 。那么到底故事如何,客官且听我细细道来。
当我试图直接安装时:
$ yum install tshark 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 没有可用软件包 tshark。 错误:无须任何处理
那么,该怎么办呢? 原来yum提供了搜索功能。
$ yum whatprovides *tshark* 已加载插件:fastestmirror Loading mirror speeds from cached hostfile base/7/x86_64/filelists_db | 6.9 MB 00:00:00 epel/x86_64/filelists | 10 MB 00:00:00 extras/7/x86_64/filelists_db | 524 kB 00:00:00 updates/7/x86_64/filelists_db | 2.1 MB 00:00:00 1:bash-completion-extras-2.1-11.el7.noarch : Additional programmable completions for Bash 源 :epel 匹配来源: 文件名 :/usr/share/bash-completion/completions/tshark wireshark-1.10.14-14.el7.i686 : Network traffic analyzer 源 :base 匹配来源: 文件名 :/usr/sbin/tshark 文件名 :/usr/share/wireshark/tshark.html 文件名 :/usr/share/man/man1/tshark.1.gz wireshark-1.10.14-14.el7.x86_64 : Network traffic analyzer 源 :base 匹配来源: 文件名 :/usr/sbin/tshark 文件名 :/usr/share/wireshark/tshark.html 文件名 :/usr/share/man/man1/tshark.1.gz
我们可以看到wireshark包已经包含了tshark包。
接下来就是我们熟悉的步骤了==。
$ yum install wireshark 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 wireshark.x86_64.0.1.10.14-14.el7 将被 安装 --> 正在处理依赖关系 libsmi.so.2()(64bit),它被软件包 wireshark-1.10.14-14.el7.x86_64 需要 --> 正在处理依赖关系 libcares.so.2()(64bit),它被软件包 wireshark-1.10.14-14.el7.x86_64 需要 --> 正在检查事务 ---> 软件包 c-ares.x86_64.0.1.10.0-3.el7 将被 安装 ---> 软件包 libsmi.x86_64.0.0.4.8-13.el7 将被 安装 --> 解决依赖关系完成 ... 已安装: wireshark.x86_64 0:1.10.14-14.el7 作为依赖被安装: c-ares.x86_64 0:1.10.0-3.el7 libsmi.x86_64 0:0.4.8-13.el7 完毕!
最后我们验证一下:
$ tshark -v TShark 1.10.14 (Git Rev Unknown from unknown) Copyright 1998-2015 Gerald Combs <[email protected]> and contributors. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled (64-bit) with GLib 2.50.3, with libpcap, with libz 1.2.7, with POSIX capabilities (Linux), without libnl, with SMI 0.4.8, with c-ares 1.10.0, with Lua 5.1, without Python, with GnuTLS 3.3.26, with Gcrypt 1.5.3, with MIT Kerberos, without GeoIP. Running on Linux 3.10.0-693.11.1.el7.x86_64, with locale zh_CN.UTF-8, with libpcap version 1.5.3, with libz 1.2.7. Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz Built using gcc 4.8.5 20150623 (Red Hat 4.8.5-16).
写这边文章并不只是只是为了说明tshark怎么在centos怎么安装,更多的是有时候我们需要扩展自己的知识面,避免重复造轮子。
原文出处:razeen -> https://razeen.me/post/how-to-install-tshark-on-centos.html
本站所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如果侵犯你的利益,请发送邮箱到 [email protected],我们会很快的为您处理。