Sniffer installation: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by 2 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.


= Latest 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,64bit or Arm arch can be downloaded from http://www.voipmonitor.org/download pages.
== 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.


== Step by step for 64bit linux procedure ==
;For 64-bit (x86_64) Systems (most common):
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz --content-disposition --no-check-certificate
<pre>
tar xzf voipmonitor-*-static.tar.gz
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O voipmonitor-sniffer.tar.gz
cd voipmonitor-*-static
</pre>
./install-script.sh


;For 32-bit (i686) Systems:
<pre>
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz -O voipmonitor-sniffer.tar.gz
</pre>


== Step by step for 32bit linux procedure ==
;For ARMv6/v7 (e.g., Raspberry Pi):
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz --content-disposition --no-check-certificate
<pre>
tar xzf voipmonitor-*-static.tar.gz
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz -O voipmonitor-sniffer.tar.gz
cd voipmonitor-*-static
</pre>
./install-script.sh


=== Step 2: Extract and Run the Install Script ===
The downloaded archive contains an installation script that automates the setup process.
<pre>
# Extract the archive
tar xzf voipmonitor-sniffer.tar.gz


== Step by step for ArmV6(RPI) linux ==
# Navigate into the newly created directory
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz --content-disposition --no-check-certificate
# The 'cd voipmonitor-*' command will work regardless of the exact version number
tar xzf voipmonitor-*-static.tar.gz
cd voipmonitor-*-static
cd voipmonitor-*-static
./install-script.sh


# 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.


= Older static versions and versions with SS7(wireshark) module =
=== Step 4: Service Management (systemd) ===
If you need for any reason to install older version of a sniffer or version including wireshark's SS7 module follow:
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>


== Install sniffer version of your choice ==
For a more detailed `systemd` service file template and advanced options, please see the [[Systemd_for_voipmonitor_service_management|systemd guide]].
Find voipmonitor*.tar.gz file of your choice at following site https://sourceforge.net/projects/voipmonitor/files/ and use the link for wget command in step by step [https://wiki.voipmonitor.org/doc/index.php?title=Sniffer_installation&action=submit#Step_by_step_for_64bit_linux_procedure above]


=== Example of wget command for version 20.4.4 with ss7(wireshark) module ===
== Advanced & Special Installation Cases ==
wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-wireshark-amd64-20.4.4-static.tar.gz --content-disposition --no-check-certificate


= Newest static versions from develop branch =
=== 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].


== Upgrade of a sniffer service step by step 64bit ==
Copy the download link for the desired file and use it with the `wget` command from Step 1.
Note: The link and version will be shared by the support team - changes the wget command and cp command which is version specific:
;Example for version 20.4.4 with the SS7 module:
mkdir /tmp/new
<pre>
cd /tmp/new/
wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-sniffer.tar.gz
wget https://download.voipmonitor.org/sniffer-develop/build-02921/tarballdevel/voipmonitor-amd64-23.1-static.tar.gz -O ./sniffer.tar.gz
</pre>
tar -xzf ./sniffer.tar.gz
Then proceed with the extraction and installation as described above.
cp /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.backup
service voipmonitor stop
cp voipmonitor-amd64-23.1-static/usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor
service voipmonitor start


=== 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>


= Configuration of a sniffer =
=== 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.


Now edit configuration file /etc/voipmonitor.conf and run voipmonitor
== Uninstallation ==
/etc/init.d/voipmonitor start
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


= Systemd script for bringing up voipmonitor service at a boot time =
# 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


If your system uses systemd for services management create a [https://wiki.voipmonitor.org/doc/Systemd_for_voipmonitor_service_management systemd startup script]
# 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


= Compile shared binary =
# 5. (Optional) Delete the spool directory (contains all captured data)
# WARNING: This is irreversible!
# rm -rf /var/spool/voipmonitor
</pre>


Please see README.* inside the sources (we recommend to use the static version)
=== 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>


git clone -b master https://github.com/voipmonitor/sniffer.git
== 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.
Ore develop branch
'''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:'''
git clone -b develop https://github.com/voipmonitor/sniffer.git
* How do I install the VoIPmonitor sniffer?
 
* What is the recommended way to install VoIPmonitor?
= Sniffer uninstallation =
* Where can I download the latest static binary for the sensor?
 
* What does the `install-script.sh` do?
== cleaning script for SysV based systems ==
* How do I start the voipmonitor service and enable it on boot?
Here is simple cleaning script.
* How can I install an older version of the sniffer?
 
* How do I completely uninstall or remove the VoIPmonitor sensor?
#!/bin/bash
* How to compile the sniffer from source code?
```
SHAREDIR=usr/local/share/voipmonitor
AUDIODIR=$SHAREDIR/audio
BINDIR=usr/local/sbin
CFGDIR=etc
INITDIR=$CFGDIR/init.d
SENSOR=voipmonitor
SPOOLDIR=/var/spool/$SENSOR
echo "Stopping $SENSOR"
/$INITDIR/$SENSOR stop
echo "Uninstalling /$SHAREDIR"
rm -rf /$SHAREDIR
echo "Uninstalling $SENSOR binary from /$BINDIR/$SENSOR"
rm /$BINDIR/$SENSOR
echo "Moving /$CFGDIR/$SENSOR.conf to /$CFGDIR/$SENSOR.conf-backup."
mv /$CFGDIR/$SENSOR.conf /$CFGDIR/$SENSOR.conf-backup
echo "Deleting $SPOOLDIR"
rm -rf $SPOOLDIR
update-rc.d $SENSOR remove &>/dev/null
chkconfig $SENSOR off &>/dev/null
chkconfig --del $SENSOR &>/dev/null
echo "Deleting starting script /$INITDIR/$SENSOR"
rm /$INITDIR/$SENSOR
echo;
echo "The database is not deleted. Do it manually.";
echo;
 
== cleaning commands for systemd based systems ==
For systemd based OSes use following commands (when chkconfig missing and paths in /etc/voipmonitor.conf kept default)
systemctl disable voipmonitor
rm /usr/local/sbin/voipmonitor
rm /etc/init.d/voipmonitor
rm /etc/voipmonitor.conf
rm -rf /var/spool/voipmonitor
 
== remove also CDRs? ==
Consider to  drop database, where are CDRs kept in case db used locally and you need to remove it, if db not used there anymore you can also uninstall db(mysql/mariadb) using system commands and remove its datadir /var/lib/mysql
mysqladmin drop database voipmonitor
mysql -e 'drop database voipmonitor'
#systemctl disable mariadb
#rm -rf /varlib/mysql
 
= FreeBSD 11 =
[[FreeBSD_11]]

Latest revision as of 10:40, 30 June 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.

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?

```