Centos/Linux 源码安装wireshark与tshark任意版本
生活随笔
收集整理的這篇文章主要介紹了
Centos/Linux 源码安装wireshark与tshark任意版本
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
wireshark官網下載地址:https://www.wireshark.org/download.html
wireshark任意版本的下載網站:http://ftp.uni-kl.de/pub/wireshark/src/all-versions
博主使用centos7.6安裝wireshark-3.2.17整個的步驟是:
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 cd cmake-3.15.3/ ./bootstrap --prefix=/usr --datadir=share/cmake --docdir=doc/cmake && make sudo make install hash -r cmake --version2. 安裝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 ../ 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).沒有wireshark / tshark命令
如果沒有提示tshark命令,解決方法:
cd /usr/local/bin ls如果找到了tshark命令,就說明是安裝成功了,但是這個目錄沒有加入到環境變量中,運行下面的命令:
sudo vim ~/.bash_profile寫入:
export PATH=/usr/local/bin:$PATH保存后退出,運行:
source ~/.bash_profile總結
以上是生活随笔為你收集整理的Centos/Linux 源码安装wireshark与tshark任意版本的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 10个高效Linux技巧及Vim命令对比
- 下一篇: Service rootservice