Wireshark is a popular network protocol analyzer that can be used to monitor and analyze network traffic. In this guide, we will show you how to install Wireshark on CentOS 6.3.
Step 1: Add the Wireshark Repository
The first step is to add the Wireshark repository to your CentOS system. Run the following command in your terminal:
sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
This command will add the EPEL (Extra Packages for Enterprise Linux) repository, which contains the Wireshark package.
Step 2: Install Wireshark
Next, you need to install the Wireshark package. Run the following command:
sudo yum install wireshark
This command will install Wireshark and any dependencies that are required.
[root@centos63 ~]# yum install wireshark -y Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfile * base: mirrors.hostemo.com * extras: mirrors.hostemo.com * updates: mirrors.hostemo.com CentOS6.3-Repository | 4.0 kB 00:00 ... base | 3.7 kB 00:00 extras | 3.0 kB 00:00 updates | 3.5 kB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package wireshark.i686 0:1.2.15-2.el6_2.1 will be installed --> Processing Dependency: libsmi.so.2 for package: wireshark-1.2.15-2.el6_2.1.i686 --> Processing Dependency: libpcap.so.1 for package: wireshark-1.2.15-2.el6_2.1.i686 --> Processing Dependency: libgnutls.so.26(GNUTLS_1_4) for package: wireshark-1.2.15-2.el6_2.1.i686 --> Processing Dependency: libgnutls.so.26 for package: wireshark-1.2.15-2.el6_2.1.i686 --> Running transaction check ---> Package gnutls.i686 0:2.8.5-4.el6_2.2 will be installed --> Processing Dependency: libtasn1.so.3(LIBTASN1_0_3) for package: gnutls-2.8.5-4.el6_2.2.i686 --> Processing Dependency: libtasn1.so.3 for package: gnutls-2.8.5-4.el6_2.2.i686 ---> Package libpcap.i686 14:1.0.0-6.20091201git117cb5.el6 will be installed ---> Package libsmi.i686 0:0.4.8-4.el6 will be installed --> Running transaction check ---> Package libtasn1.i686 0:2.3-3.el6_2.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== Installing: wireshark i686 1.2.15-2.el6_2.1 CentOS6.3-Repository 9.9 M Installing for dependencies: gnutls i686 2.8.5-4.el6_2.2 CentOS6.3-Repository 336 k libpcap i686 14:1.0.0-6.20091201git117cb5.el6 CentOS6.3-Repository 125 k libsmi i686 0.4.8-4.el6 CentOS6.3-Repository 2.4 M libtasn1 i686 2.3-3.el6_2.1 CentOS6.3-Repository 239 k Transaction Summary ==================================================================================================== Install 5 Package(s) Total download size: 13 M Installed size: 64 M Downloading Packages: Setting up and reading Presto delta metadata Processing delta metadata Package(s) data still to download: 13 M ---------------------------------------------------------------------------------------------------- Total 12 MB/s | 13 MB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : libtasn1-2.3-3.el6_2.1.i686 1/5 Installing : gnutls-2.8.5-4.el6_2.2.i686 2/5 Installing : libsmi-0.4.8-4.el6.i686 3/5 Installing : 14:libpcap-1.0.0-6.20091201git117cb5.el6.i686 4/5 Installing : wireshark-1.2.15-2.el6_2.1.i686 5/5 Verifying : 14:libpcap-1.0.0-6.20091201git117cb5.el6.i686 1/5 Verifying : libsmi-0.4.8-4.el6.i686 2/5 Verifying : gnutls-2.8.5-4.el6_2.2.i686 3/5 Verifying : libtasn1-2.3-3.el6_2.1.i686 4/5 Verifying : wireshark-1.2.15-2.el6_2.1.i686 5/5 Installed: wireshark.i686 0:1.2.15-2.el6_2.1 Dependency Installed: gnutls.i686 0:2.8.5-4.el6_2.2 libpcap.i686 14:1.0.0-6.20091201git117cb5.el6 libsmi.i686 0:0.4.8-4.el6 libtasn1.i686 0:2.3-3.el6_2.1 Complete!
Step 3: Configure User Access
By default, Wireshark can only be run by the root user. To allow non-root users to run Wireshark, you need to add them to the wireshark group. Run the following command:
sudo usermod -a -G wireshark USERNAME
Replace USERNAME with the username of the user you want to add to the wireshark group.
Step 4: Run Wireshark
Now that Wireshark is installed, you can run it by typing the following command in your terminal:
wireshark
If you are running Wireshark as a non-root user, you may need to run it with elevated privileges by using the following command:
gksu wireshark
This command will prompt you for your password and then launch Wireshark with root privileges.
Commands Mentioned:
- sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm – Add the EPEL repository
- sudo yum install wireshark – Install the Wireshark package
- sudo usermod -a -G wireshark USERNAME – Add a user to the wireshark group
- wireshark – Run Wireshark
- gksu wireshark – Run Wireshark with elevated privileges
Conclusion
In this guide, we have shown you how to install Wireshark on CentOS 6.3. By adding the EPEL repository and installing the Wireshark package, you can easily monitor and analyze network traffic. We also showed you how to configure user access so that non-root users can run Wireshark, and how to launch Wireshark with elevated privileges if necessary. We hope this guide has been helpful to you. If you have any comments or suggestions for improvements, please feel free to share them below.
1 Comment
Okay, so then what once it is installed?