wireshark官网下载地址:https://www.wireshark.org/download.html
wireshark任意版本的下载网站:http://ftp.uni-kl.de/pub/wireshark/src/all-versions
博主使用centos7.6安装wireshark-3.2.17
整个的步骤是:
- 升级cmake
- 安装python3.5+
- 源码安装wireshark
1. 升级cmake
先安装依赖包大全:
sudo yum -y install cmake3 glib2-devel libpcap libpcap-devel libgcrypt-devel glib2-devel qt-devel qt5-qtbase-devel qt5-linguist qt5-qtmultimedia-devel qt5-qtsvg-devel libcap-devel libcap-ng-devel gnutls-devel krb5-devel libxml2-devel lua-devel lz4-devel snappy-devel spandsp-devel libssh2-devel bcg729-devel libmaxminddb-devel sbc-devel libsmi-devel libnl3-devel libnghttp2-devel libssh-devel libpcap-devel c-ares-devel redhat-rpm-config rpm-build gtk+-devel gtk3-devel desktop-file-utils portaudio-devel rubygem-asciidoctor docbook5-style-xsl docbook-style-xsl systemd-devel python34 cmake3 git gcc gcc-c++ flex bison doxygen gettext-devel libxslt cmake
wget https://down.24kplus.com/linux/cmake-3.15.3.tar.gz
tar -zxf cmake-3.15.3.tar.gz
./bootstrap --prefix=/usr --datadir=share/cmake --docdir=doc/cmake && make
sudo make install
hash -r
cmake --version
2. 安装python3
参考:Linux/Centos源码安装python3任意版本
3. 源码安装wireshark
centos7的安装版本最好不要太高,这里博主安装的是wireshark-3.2.17
wget -c http://ftp.uni-kl.de/pub/wireshark/src/all-versions/wireshark-3.2.17.tar.xz
tar -xf wireshark-3.2.17.tar.xz
cd wireshark-3.2.17/
mkdir build
cd build
# cmake -DCMAKE_INSTALL_PREFIX=/opt/wireshark-3.2.17 ../
cmake ../
make
sudo make install
然后就安装好了,运行:
tshark -v
可以看到是tshark 3.2.17版本:
TShark (Wireshark) 3.2.17 (Git commit f73d1bc180e7)
Copyright 1998-2021 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/gpl-2.0.html>
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 libpcap, with POSIX capabilities (Linux), with libnl 3,
with GLib 2.56.1, with zlib 1.2.7, with SMI 0.4.8, with c-ares 1.10.0, with Lua
5.1.4, with GnuTLS 3.3.29, with Gcrypt 1.5.3, with MIT Kerberos, with MaxMind DB
resolver, without nghttp2, without brotli, with LZ4, without Zstandard, with
Snappy, with libxml2 2.9.1.
Running on Linux 3.10.0-957.el7.x86_64, with Intel(R) Core(TM) i9-9880H CPU @
2.30GHz (with SSE4.2), with 972 MB of physical memory, with locale C, with
libpcap version 1.5.3, with GnuTLS 3.3.29, with Gcrypt 1.5.3, with zlib 1.2.7,
binary plugins supported (0 loaded).
Built using gcc 4.8.5 20150623 (Red Hat 4.8.5-44).