Step 1: Install Packetbeat
editStep 1: Install Packetbeat
editBefore you begin: If you haven’t installed the Elastic Stack, do that now. See Getting started with the Elastic Stack.
To download and install Packetbeat, use the commands that work with your system.
If you use Apt or Yum, you can install Packetbeat from our repositories to update to the newest version more easily.
See our download page for other installation options, such as 32-bit images.
sudo apt-get install libpcap0.8 curl -L -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-7.2.1-amd64.deb sudo dpkg -i packetbeat-7.2.1-amd64.deb
sudo yum install libpcap curl -L -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-7.2.1-x86_64.rpm sudo rpm -vi packetbeat-7.2.1-x86_64.rpm
See Running on Docker for deploying Docker containers.
curl -L -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-7.2.1-darwin-x86_64.tar.gz tar xzvf packetbeat-7.2.1-darwin-x86_64.tar.gz
brew tap elastic/tap brew install elastic/tap/packetbeat-full
This installs the most recently released default distribution of Packetbeat.
To install the OSS distribution, specify elastic/tap/packetbeat-oss
.
curl -L -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-7.2.1-linux-x86_64.tar.gz tar xzvf packetbeat-7.2.1-linux-x86_64.tar.gz
-
Download and install a packet sniffing library, such as Npcap, that implements the libpcap interfaces.
If you use Npcap, make sure you install it in WinPcap API-compatible mode. If you plan to capture traffic from the loopback device (127.0.0.1 traffic), also select the option to support loopback traffic.
- Download the Packetbeat Windows zip file from the downloads page.
-
Extract the contents of the zip file into
C:\Program Files
. -
Rename the
packetbeat-<version>-windows
directory toPacketbeat
. - Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select Run As Administrator).
-
From the PowerShell prompt, run the following commands to install Packetbeat as a Windows service:
PS > cd 'C:\Program Files\Packetbeat' PS C:\Program Files\Packetbeat> .\install-service-packetbeat.ps1
If script execution is disabled on your system, you need to set the execution policy for the current session to allow the script to run. For example: PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-packetbeat.ps1
.
Before starting Packetbeat, you should look at the configuration options in the
configuration file, for example C:\Program Files\Packetbeat\packetbeat.yml
or /etc/packetbeat/packetbeat.yml
. For
more information about these options, see Configuring Packetbeat.