Sniffer installation: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
VoIP monitor sniffer can be installed in two ways - either as static binary which will run on any Linux distribution with kernels >= 2.6.18 or compiled from sources.


= Static binary =
'''This guide provides step-by-step instructions for installing the VoIPmonitor sensor (sniffer). The recommended method for all modern Linux distributions is to use the pre-compiled static binary.'''


Static binary for 32bit or 64bit can be downloaded from http://www.voipmonitor.org/download pages. Step by step for 64bit linux procedure:
== Recommended Method: Static Binary Installation ==
tar xzf voipmonitor-*-static.tar.gz
A static binary includes all necessary libraries and is the quickest and most reliable way to get the sensor running on any supported Linux distribution with a kernel version of 2.6.18 or newer.
cd voipmonitor-*-static
./install-script.sh
cp voipmonitor.conf /etc/
mysqladmin create voipmonitor
# Now edit configuration file /etc/voipmonitor.conf and run voipmonitor
/etc/init.d/voipmonitor start


= Compile shared binary =
=== Step 1: Download the Correct Archive ===
First, download the latest stable binary for your system's architecture from the official website.


== Debian ==
;For 64-bit (x86_64) Systems (most common):
<pre>
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O voipmonitor-sniffer.tar.gz
</pre>


apt-get install build-essential subversion libmysqlclient-dev libvorbis-dev libpcap-dev apache2 php5-mysql php5-gd mysql-server unixodbc-dev
;For 32-bit (i686) Systems:
cd /usr/src
<pre>
svn co http://svn.code.sf.net/p/voipmonitor/code/trunk voipmonitor-svn
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz -O voipmonitor-sniffer.tar.gz
cd voipmonitor-svn
</pre>
./configure make make install
 
mkdir /var/spool/voipmonitor
;For ARMv6/v7 (e.g., Raspberry Pi):
mysqladmin create voipmonitor
<pre>
cp config/voipmonitor.conf /etc/
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz -O voipmonitor-sniffer.tar.gz
#edit file /etc/voipmonitor.conf to your needs
</pre>
cp config/init.d/voipmonitor /etc/init.d/
 
update-rc.d voipmonitor defaults
=== Step 2: Extract and Run the Install Script ===
/etc/init.d/voipmonitor start
The downloaded archive contains an installation script that automates the setup process.
<pre>
# Extract the archive
tar xzf voipmonitor-sniffer.tar.gz
 
# Navigate into the newly created directory
# The 'cd voipmonitor-*' command will work regardless of the exact version number
cd voipmonitor-*-static
 
# Run the installation script with root privileges
./install-script.sh
</pre>
The `install-script.sh` will:
* Copy the `voipmonitor` binary to `/usr/local/sbin/`.
* Copy the default configuration file to `/etc/voipmonitor.conf`.
* Copy the service startup script to `/etc/init.d/voipmonitor`.
* Attempt to enable the service to start on boot.
 
=== Step 3: Initial Configuration ===
After the installation, you must edit the main configuration file to connect the sensor to your database and set basic parameters.
<pre>
nano /etc/voipmonitor.conf
</pre>
At a minimum, configure your [[Sniffer_configuration#MySQL_Options|database connection settings]] and the [[Sniffer_configuration#Basic_Options|network interface]] to monitor.
 
=== Step 4: Service Management (systemd) ===
Modern Linux distributions use `systemd` to manage services. Use the following commands to control the sniffer:
 
;Start the service:
:<pre>systemctl start voipmonitor</pre>
;Stop the service:
:<pre>systemctl stop voipmonitor</pre>
;Check the service status:
:<pre>systemctl status voipmonitor</pre>
;Enable the service to start automatically on boot:
:<pre>systemctl enable voipmonitor</pre>
 
For a more detailed `systemd` service file template and advanced options, please see the [[Systemd_for_voipmonitor_service_management|systemd guide]].
 
== Advanced & Special Installation Cases ==
 
=== Installing a Specific or Older Version ===
If you need a specific version (e.g., one that includes the Wireshark SS7 module), you can find historical releases on the [https://sourceforge.net/projects/voipmonitor/files/ VoIPmonitor SourceForge page].
 
Copy the download link for the desired file and use it with the `wget` command from Step 1.
;Example for version 20.4.4 with the SS7 module:
<pre>
wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-sniffer.tar.gz
</pre>
Then proceed with the extraction and installation as described above.
 
=== Installing a Development Build (Manual Upgrade) ===
If instructed by the support team, you can manually upgrade to a new development build.
<pre>
# Create a temporary directory and download the new build
mkdir /tmp/new-sniffer && cd /tmp/new-sniffer
wget https://download.voipmonitor.org/some-development-build.tar.gz -O sniffer.tar.gz
tar xzf sniffer.tar.gz
 
# Stop the current service and back up the old binary
systemctl stop voipmonitor
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.backup


# Copy the new binary into place and start the service
cp voipmonitor-*-static/voipmonitor /usr/local/sbin/voipmonitor
systemctl start voipmonitor
</pre>


== Centos ==
=== Compiling from Source ===
For developers or special use cases, you can compile the sniffer from its source code. This is '''not''' the recommended method for most users.
;Clone the master branch (stable):
:<pre>git clone https://github.com/voipmonitor/sniffer.git</pre>
;Or clone the develop branch (latest features):
:<pre>git clone -b develop https://github.com/voipmonitor/sniffer.git</pre>
Then follow the instructions in the `README` file within the repository.


=== Example of compiling from the source (e.g. for arm64) ===
Debian12


  yum groupinstall 'Development Tools'
  apt install git make g++ unixodbc-dev libvorbis-dev libmp3lame-dev libmpg123-dev libpcap-dev libssl-dev libsnappy-dev libcurl4-openssl-dev libicu-dev libpng-dev libjpeg-dev libfftw3-dev libjson-c-dev librrd-dev libglib2.0-dev libxml2-dev libmariadb-dev-compat libmariadb-dev libzstd-dev liblz4-dev liblzma-dev liblzo2-dev gnutls-dev libgcrypt-dev libgoogle-perftools-dev
yum install subversion libpcap-devel mysql-devel libogg libogg-devel vorbis-tools libvorbis libvorbis-devel mysql-server unixODBC-devel
  svn co http://svn.code.sf.net/p/voipmonitor/code/trunk voipmonitor-svn
cd /usr/src
  cd voipmonitor-svn
  git clone https://github.com/voipmonitor/sniffer.git
  cd sniffer
  ./configure
  ./configure
  make
  make
  make install
  # if exists old binary
  mkdir /var/spool/voipmonitor
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.static
  /etc/init.d/mysqld start
mysqladmin create voipmonitor
  mv /usr/src/sniffer/voipmonitor /usr/local/sbin/voipmonitor
cp config/voipmonitor.conf /etc/
 
#edit file /etc/voipmonitor.conf to your needs
Add these lines to the config:
cp config/init.d/voipmonitor /etc/init.d/
 
chkconfig --add voipmonitor
upgrade_by_git = yes
chkconfig voipmonitor on
 
/etc/init.d/voipmonitor start
git_folder = /usr/src/sniffer
 
AND restart:
  service voipmonitor restart
 
== Uninstallation ==
To completely remove the VoIPmonitor sensor from a system, follow these steps.
 
=== For systemd-based Systems (Recommended) ===
<pre>
# 1. Stop and disable the service
systemctl stop voipmonitor
systemctl disable voipmonitor
 
# 2. Remove the service files and binary
rm -f /etc/systemd/system/voipmonitor.service
rm -f /etc/init.d/voipmonitor
rm -f /usr/local/sbin/voipmonitor
 
# 3. Reload systemd to apply changes
systemctl daemon-reload
 
# 4. (Optional) Back up and remove the configuration file
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup
 
# 5. (Optional) Delete the spool directory (contains all captured data)
# WARNING: This is irreversible!
# rm -rf /var/spool/voipmonitor
</pre>
 
=== For older SysV-based Systems ===
Run the following commands to stop the service and remove its files:
<pre>
/etc/init.d/voipmonitor stop
update-rc.d voipmonitor remove
rm -f /etc/init.d/voipmonitor
rm -f /usr/local/sbin/voipmonitor
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup
</pre>
 
== AI Summary for RAG ==
'''Summary:''' This guide provides a step-by-step process for installing the VoIPmonitor sensor (sniffer). The primary and recommended method is using the pre-compiled static binary, which involves downloading the correct archive for the system architecture (64-bit, 32-bit, or ARM), extracting it, and running the included `install-script.sh`. The guide details the post-installation steps: editing `/etc/voipmonitor.conf` and managing the service with `systemctl` (start, stop, enable). It also covers advanced scenarios, such as installing a specific older version from SourceForge, manually upgrading to a development build, and compiling from source via `git clone`. Finally, it provides complete uninstallation procedures for both modern `systemd` systems and older `SysV` systems, including commands to remove binaries, configuration files, and service links.
'''Keywords:''' install, installation, setup, sniffer, sensor, static binary, install-script.sh, download, wget, tar.gz, systemd, systemctl, enable on boot, start service, compile from source, git, development build, upgrade, uninstall, remove, SysV, init.d, arm, x86_64
'''Key Questions:'''
* How do I install the VoIPmonitor sniffer?
* What is the recommended way to install VoIPmonitor?
* Where can I download the latest static binary for the sensor?
* What does the `install-script.sh` do?
* How do I start the voipmonitor service and enable it on boot?
* How can I install an older version of the sniffer?
* How do I completely uninstall or remove the VoIPmonitor sensor?
* How to compile the sniffer from source code?
```

Latest revision as of 14:11, 7 July 2025

This guide provides step-by-step instructions for installing the VoIPmonitor sensor (sniffer). The recommended method for all modern Linux distributions is to use the pre-compiled static binary.

Recommended Method: Static Binary Installation

A static binary includes all necessary libraries and is the quickest and most reliable way to get the sensor running on any supported Linux distribution with a kernel version of 2.6.18 or newer.

Step 1: Download the Correct Archive

First, download the latest stable binary for your system's architecture from the official website.

For 64-bit (x86_64) Systems (most common)
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O voipmonitor-sniffer.tar.gz
For 32-bit (i686) Systems
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz -O voipmonitor-sniffer.tar.gz
For ARMv6/v7 (e.g., Raspberry Pi)
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz -O voipmonitor-sniffer.tar.gz

Step 2: Extract and Run the Install Script

The downloaded archive contains an installation script that automates the setup process.

# Extract the archive
tar xzf voipmonitor-sniffer.tar.gz

# Navigate into the newly created directory
# The 'cd voipmonitor-*' command will work regardless of the exact version number
cd voipmonitor-*-static

# Run the installation script with root privileges
./install-script.sh

The `install-script.sh` will:

  • Copy the `voipmonitor` binary to `/usr/local/sbin/`.
  • Copy the default configuration file to `/etc/voipmonitor.conf`.
  • Copy the service startup script to `/etc/init.d/voipmonitor`.
  • Attempt to enable the service to start on boot.

Step 3: Initial Configuration

After the installation, you must edit the main configuration file to connect the sensor to your database and set basic parameters.

nano /etc/voipmonitor.conf

At a minimum, configure your database connection settings and the network interface to monitor.

Step 4: Service Management (systemd)

Modern Linux distributions use `systemd` to manage services. Use the following commands to control the sniffer:

Start the service
systemctl start voipmonitor
Stop the service
systemctl stop voipmonitor
Check the service status
systemctl status voipmonitor
Enable the service to start automatically on boot
systemctl enable voipmonitor

For a more detailed `systemd` service file template and advanced options, please see the systemd guide.

Advanced & Special Installation Cases

Installing a Specific or Older Version

If you need a specific version (e.g., one that includes the Wireshark SS7 module), you can find historical releases on the VoIPmonitor SourceForge page.

Copy the download link for the desired file and use it with the `wget` command from Step 1.

Example for version 20.4.4 with the SS7 module
wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-sniffer.tar.gz

Then proceed with the extraction and installation as described above.

Installing a Development Build (Manual Upgrade)

If instructed by the support team, you can manually upgrade to a new development build.

# Create a temporary directory and download the new build
mkdir /tmp/new-sniffer && cd /tmp/new-sniffer
wget https://download.voipmonitor.org/some-development-build.tar.gz -O sniffer.tar.gz
tar xzf sniffer.tar.gz

# Stop the current service and back up the old binary
systemctl stop voipmonitor
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.backup

# Copy the new binary into place and start the service
cp voipmonitor-*-static/voipmonitor /usr/local/sbin/voipmonitor
systemctl start voipmonitor

Compiling from Source

For developers or special use cases, you can compile the sniffer from its source code. This is not the recommended method for most users.

Clone the master branch (stable)
git clone https://github.com/voipmonitor/sniffer.git
Or clone the develop branch (latest features)
git clone -b develop https://github.com/voipmonitor/sniffer.git

Then follow the instructions in the `README` file within the repository.

Example of compiling from the source (e.g. for arm64)

Debian12

apt install git make g++ unixodbc-dev libvorbis-dev libmp3lame-dev libmpg123-dev libpcap-dev libssl-dev libsnappy-dev libcurl4-openssl-dev libicu-dev libpng-dev libjpeg-dev libfftw3-dev libjson-c-dev librrd-dev libglib2.0-dev libxml2-dev libmariadb-dev-compat libmariadb-dev libzstd-dev liblz4-dev liblzma-dev liblzo2-dev gnutls-dev libgcrypt-dev libgoogle-perftools-dev 

cd /usr/src
git clone https://github.com/voipmonitor/sniffer.git
cd sniffer
./configure
make
# if exists old binary
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.static

mv /usr/src/sniffer/voipmonitor /usr/local/sbin/voipmonitor

Add these lines to the config:

upgrade_by_git = yes

git_folder = /usr/src/sniffer

AND restart:

service voipmonitor restart

Uninstallation

To completely remove the VoIPmonitor sensor from a system, follow these steps.

For systemd-based Systems (Recommended)

# 1. Stop and disable the service
systemctl stop voipmonitor
systemctl disable voipmonitor

# 2. Remove the service files and binary
rm -f /etc/systemd/system/voipmonitor.service
rm -f /etc/init.d/voipmonitor
rm -f /usr/local/sbin/voipmonitor

# 3. Reload systemd to apply changes
systemctl daemon-reload

# 4. (Optional) Back up and remove the configuration file
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup

# 5. (Optional) Delete the spool directory (contains all captured data)
# WARNING: This is irreversible!
# rm -rf /var/spool/voipmonitor

For older SysV-based Systems

Run the following commands to stop the service and remove its files:

/etc/init.d/voipmonitor stop
update-rc.d voipmonitor remove
rm -f /etc/init.d/voipmonitor
rm -f /usr/local/sbin/voipmonitor
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup

AI Summary for RAG

Summary: This guide provides a step-by-step process for installing the VoIPmonitor sensor (sniffer). The primary and recommended method is using the pre-compiled static binary, which involves downloading the correct archive for the system architecture (64-bit, 32-bit, or ARM), extracting it, and running the included `install-script.sh`. The guide details the post-installation steps: editing `/etc/voipmonitor.conf` and managing the service with `systemctl` (start, stop, enable). It also covers advanced scenarios, such as installing a specific older version from SourceForge, manually upgrading to a development build, and compiling from source via `git clone`. Finally, it provides complete uninstallation procedures for both modern `systemd` systems and older `SysV` systems, including commands to remove binaries, configuration files, and service links. Keywords: install, installation, setup, sniffer, sensor, static binary, install-script.sh, download, wget, tar.gz, systemd, systemctl, enable on boot, start service, compile from source, git, development build, upgrade, uninstall, remove, SysV, init.d, arm, x86_64 Key Questions:

  • How do I install the VoIPmonitor sniffer?
  • What is the recommended way to install VoIPmonitor?
  • Where can I download the latest static binary for the sensor?
  • What does the `install-script.sh` do?
  • How do I start the voipmonitor service and enable it on boot?
  • How can I install an older version of the sniffer?
  • How do I completely uninstall or remove the VoIPmonitor sensor?
  • How to compile the sniffer from source code?

```