Inside Docker containers you typically run as root, so sudo is neither available nor needed. All commands below use sudo for host installations. In Docker containers, omit sudo from every command (or define an alias: alias sudo='').
To detect if you are in a Docker container:
if [ -f /.dockerenv ] || grep -q docker /proc/1/cgroup 2>/dev/null; then
SUDO=""echo"Docker detected: running without sudo"else
SUDO="sudo"echo"Host detected: using sudo"fi
$SUDO apt-get install -y libxml2-dev libpcap-dev libconfuse-dev
cd"$TMP_DIR"
git clone https://github.com/Montimage/mmt-security.git mmt-security
cd mmt-security
make clean-all
make -j1 # Must use single thread for header generation ordering$SUDO make install && $SUDO ldconfig
Verify: ls /opt/mmt/security/lib/libmmt_security2.*
Step 4: Compile MMT-Probe
Navigate to the MMT-Probe source directory.
Minimal build (file output + PCAP only)
make clean
make -j$(nproc) compile
Build with selected modules
Combine any module targets before compile:
make -j$(nproc) KAFKA_MODULE REDIS_MODULE SECURITY_MODULE PCAP_DUMP_MODULE QOS_MODULE SOCKET_MODULE compile
Available module targets
Module Target
Requires
REDIS_MODULE
hiredis
KAFKA_MODULE
librdkafka
MONGODB_MODULE
mongo-c-driver
MQTT_MODULE
libpaho-mqtt
SECURITY_MODULE
MMT-Security + libxml2
PCAP_DUMP_MODULE
(none)
QOS_MODULE
(none)
SOCKET_MODULE
(none)
LTE_MODULE
(none)
DYNAMIC_CONFIG_MODULE
(none)
TCP_REASSEMBLY_MODULE
(none)
HTTP_RECONSTRUCT_MODULE
(none, implies TCP)
FTP_RECONSTRUCT_MODULE
(none, implies TCP)
Build ALL modules
make -j$(nproc) ALL_MODULES compile
Requires all optional libraries from Step 3 to be installed.
Build options
Option
Effect
DEBUG
Enable debug symbols (-g -O0)
VERBOSE
Print detailed compilation commands
STATIC_LINK
Embed MMT-DPI and MMT-Security into binary
DISABLE_REPORT
Skip DPI statistics
SIMPLE_REPORT
Minimal session reports (for MMT-Box)
MMT_BASE=/path
Custom install prefix (default: /opt/mmt)
DPDK capture (instead of PCAP)
export RTE_SDK=/path/to/dpdk
export RTE_TARGET=build
make -j$(nproc) DPDK_CAPTURE compile
Step 5: Install
$SUDO make install
# Or with modules:$SUDO make KAFKA_MODULE REDIS_MODULE SECURITY_MODULE install
Installs to /opt/mmt/probe/ (or $MMT_BASE/probe/):
bin/probe — executable
mmt-probe.conf — configuration file
result/report/online/ — default report output
Create packages (optional)
make deb # Debian .deb
make KAFKA_MODULE REDIS_MODULE deb # .deb with modules
make rpm # RHEL .rpm
Docker Alternative
# Pull pre-built image
docker pull ghcr.io/montimage/mmt-probe:latest
# Or build from sourcecd /path/to/mmt-probe
docker build -t mmt-probe:local .
Automated Script
For a fully automated installation with all modules on Debian/Ubuntu:
$SUDO ./script/install-from-source.sh
This installs all dependencies, compiles with all modules, and creates a .deb package.
Verification
./probe -v # Print version (e.g., mmt-probe 1.6.0)
./probe -h # Print usage help$SUDO ./probe -t test/UA-Exp01.pcap -Xfile-output.output-dir=/tmp/mmt-test/
ls -la /tmp/mmt-test/ # Should contain report files
ldd /opt/mmt/probe/bin/probe # All libraries resolved (no "not found")
Troubleshooting
Error
Cause
Solution
ERROR: Not found MMT-DPI at folder /opt/mmt/dpi
MMT-DPI not installed
Install MMT-DPI (Step 2)
Not found MMT-Security at /opt/mmt/security
MMT-Security missing
Install it (Step 3e) or remove SECURITY_MODULE
-lhiredis not found
hiredis missing
Install (Step 3a) or remove REDIS_MODULE
-lrdkafka not found
librdkafka missing
Install (Step 3b) or remove KAFKA_MODULE
-lmongoc-1.0 not found
mongo-c-driver missing
Install (Step 3c) or remove MONGODB_MODULE
-lpaho-mqtt3c not found
libpaho-mqtt missing
Install (Step 3d) or remove MQTT_MODULE
error while loading shared libraries
Library not in LD path
Run ldconfig (or sudo ldconfig on host)
Library path issues
/usr/local/lib not in linker path
ldconfig -p | grep <lib> to check
sudo: command not found
Running inside Docker
Omit sudo — you are already root in Docker
Important Notes
Always run make clean before recompiling with different modules.
Run ldconfig (or sudo ldconfig on host) after installing any shared library.