How to Install Wireshark on CentOS 6.2

Wireshark is a powerful and widely used network protocol analyzer that allows you to capture and analyze network traffic. It is an essential tool for network administrators and security professionals.

In this guide, we will walk you through the steps to install Wireshark on CentOS 6.2.

Step 1: Enable EPEL Repository:

Wireshark is not available in the default CentOS 6.2 repositories. To install it, we need to enable the Extra Packages for Enterprise Linux (EPEL) repository. Open your terminal or SSH into your server and execute the following command:

sudo yum install epel-release

This command installs the EPEL repository, which provides additional packages not found in the default CentOS repositories.

Step 2: Install Wireshark:

Once the EPEL repository is enabled, you can proceed to install Wireshark. Run the following command:

sudo yum install wireshark

This command will download and install Wireshark and its dependencies from the EPEL repository.

[root@centos62 ~]# yum install wireshark
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.maulvi.net
 * extras: centos.maulvi.net
 * updates: centos.maulvi.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wireshark.i686 0:1.2.15-2.el6 will be installed
--> Processing Dependency: libpcap.so.1 for package: wireshark-1.2.15-2.el6.i686
--> Processing Dependency: libsmi.so.2 for package: wireshark-1.2.15-2.el6.i686
--> Processing Dependency: libgnutls.so.26 for package: wireshark-1.2.15-2.el6.i686
--> Processing Dependency: libgnutls.so.26(GNUTLS_1_4) for package: wireshark-1.2.15-2.el6.i686
--> Running transaction check
---> Package gnutls.i686 0:2.8.5-4.el6 will be installed
--> Processing Dependency: libtasn1.so.3(LIBTASN1_0_3) for package: gnutls-2.8.5-4.el6.i686
--> Processing Dependency: libtasn1.so.3 for package: gnutls-2.8.5-4.el6.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 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package         Arch       Version                                Repository                  Size
====================================================================================================
Installing:
 wireshark       i686       1.2.15-2.el6                           CentOS6.2-Repository       9.9 M
Installing for dependencies:
 gnutls          i686       2.8.5-4.el6                            CentOS6.2-Repository       336 k
 libpcap         i686       14:1.0.0-6.20091201git117cb5.el6       CentOS6.2-Repository       125 k
 libsmi          i686       0.4.8-4.el6                            CentOS6.2-Repository       2.4 M
 libtasn1        i686       2.3-3.el6                              CentOS6.2-Repository       239 k

Transaction Summary
====================================================================================================
Install       5 Package(s)

Total download size: 13 M
Installed size: 64 M
Is this ok [y/N]: y
Downloading Packages:
----------------------------------------------------------------------------------------------------
Total                                                                30 MB/s |  13 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libtasn1-2.3-3.el6.i686                                                          1/5
  Installing : gnutls-2.8.5-4.el6.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.i686                                                      5/5

Installed:
  wireshark.i686 0:1.2.15-2.el6

Dependency Installed:
  gnutls.i686 0:2.8.5-4.el6 libpcap.i686 14:1.0.0-6.20091201git117cb5.el6 libsmi.i686 0:0.4.8-4.el6
  libtasn1.i686 0:2.3-3.el6

Complete!

Step 3: Configure Wireshark (Optional):

By default, Wireshark can only be run by the root user. If you want to allow non-root users to use Wireshark, you need to grant them permission. Execute the following command:

sudo groupadd wireshark
sudo usermod -a -G wireshark your_username
sudo chgrp wireshark /usr/sbin/dumpcap
sudo chmod 750 /usr/sbin/dumpcap
sudo setcap cap_net_raw,cap_net_admin=eip /usr/sbin/dumpcap

Replace ‘your_username’ with the actual username of the non-root user. These commands create a group called ‘wireshark’, add the user to the group, and set the necessary permissions and capabilities.

See also  How to Install Webtatic Repository on RHEL 6/CentOS 6

Step 4: Start Wireshark:

After installation and configuration, you can start Wireshark by running the following command:

wireshark

This command launches the Wireshark graphical user interface (GUI), where you can start capturing and analyzing network traffic.

Conclusion:

In this guide, we have learned how to install Wireshark on CentOS 6.2. By following these steps, you can have Wireshark up and running on your system, allowing you to analyze network traffic and troubleshoot network issues. Remember to use Wireshark responsibly and in accordance with applicable laws and regulations.

See also  How to Add User into Group in Linux

If you have any questions or suggestions for improvement, feel free to comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *