转帖:linux下wireshark安装和使用

Wireshark是世界上最流行的网络分析工具。这个强大的工具可以捕捉网络中的数据,并为用户提供关于网络和上层协议的各种信息。与很多其他网络工具一样,Wireshark也使用pcapnetwork library来进行封包捕捉。AD:Wireshark是世界上最流行的网络分析工具。这个强大的工具可以捕捉网络中的数据,并为用户提供关于网络和上层协议的各种信息。与很多其他网络工
摘要由CSDN通过智能技术生成

Wireshark是世界上最流行的网络分析工具。这个强大的工具可以捕捉网络中的数据,并为用户提供关于网络和上层协议的各种信息。与很多其他网络工具一样,Wireshark也使用pcap network library来进行封包捕捉。

AD:


Wireshark是世界上最流行的网络分析工具。这个强大的工具可以捕捉网络中的数据,并为用户提供关于网络和上层协议的各种信息。
与很多其他网络工具一样,Wireshark也使用pcap network library来进行封包捕捉。

Wireshark的优势:

- 安装方便。

- 简单易用的界面。

- 提供丰富的功能。

Wireshark的原名是Ethereal,新名字是2006年起用的。当时Ethereal的主要开发者决定离开他原来供职的公司,并继续开发这个软件。但由于Ethereal这个名称的使用权已经被原来那个公司注册,Wireshark这个新名字也就应运而生了。

系统要求:

libpcap库对于Ethereal和Wireshark都非常重要,它们需要使用这个库的功能进行封包捕捉工作。
如果您的系统中没有安装libpcap或者其它必要的组件,当您使用"apt-get"安装Ethereal或Wireshark时,它们都会被自动添加。请参考 Wireshark tutorial

使用如下命令,可以得到Ethereal或Wireshark的详细依赖关系列表。

#apt-cache depends wireshark
#apt-cache depends ethereal

这是在我们的系统上得到的结果:

# apt-cache depends ethereal

ethereal

Dépend: libadns1

Dépend: libatk1.0-0

Dépend: libc6

Dépend: libcairo2

Dépend: libcap1

Dépend: libfontconfig1

Dépend: libglib2.0-0

Dépend: libgnutls12

Dépend: libgtk2.0-0

Dépend: libpango1.0-0

Dépend: libpcap0.8

Dépend: libpcre3

Dépend: libx11-6

Dépend: libxcursor1

Dépend: libxext6

Dépend: libxfixes3

Dépend: libxi6

Dépend: libxinerama1

Dépend: libxrandr2

Dépend: libxrender1

Dépend: zlib1g

Dépend: ethereal-common

Recommande: gksu

安装:

使用安装包安装:
需要强调的是,Wireshark并没有提供针对Ubuntu edgy(6.10)之前版本的安装包,也没有直接提供能在Debian上稳定运行的版本。
在这些情况下,您需要下载Ethereal的包,或者直接下载Wireshark的源代码然后自行编译。

Ubuntu

Ubuntu Edgy (6.10) 之前的版本:

 

#apt-get install ethereal

Ubuntu Edgy (6.10)之后的版本(包括Edgy):

 

#apt-get install wireshark

Debian

截止到2007年3月,还没有一个版本的Wireshark能在Debian上稳定运行。因此您可以选择下载Ethereal Ethereal

 

#apt-get install ethereal

或者从debian package website下载和使用不稳定版本的Wireshark。
若要在Debian或者Ubuntu下运行Wireshark或者Ethereal:

 

#ethereal

 

#wireshark

手动安装:
安装编译工具:

#apt-get install build-essantial
为了成功编译Wireshark,您需要安装GTK+的开发文件和GLib库(libraries)。
#apt-get install libgtk2.0-dev libglib2.0-dev
安装 Checkinstall以便管理您系统中直接由源代码编译安装的软件。
#apt-get install checkinstall
下载并解压缩Wireshark的源代码:
#tar -xvf wireshark-0.99.5.tar.gz
检查Wireshark的依赖关系:
#cd wireshark-0.99.5
#./configure
如果出现如下错误信息,说明您需要安装GTK+和GLib库(请参照前述步骤):
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.0.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: GLib2 distribution not found.

编译和安装:
#make
#checkinstall
运行Wireshark:
#wireshark
安装TSHARK:
您可以方便的通过如下方法安装Tshark(命令行模式工具):
#apt-get install tshark
运行:

在这篇教程中,我们将要介绍如何使用默认设置运行Wireshark。
您可以从

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值