# Debian based
sudo apt-get install nlohmann-json3-dev libzmq3-dev
git clone --recurse-submodules https://github.com/wdl83/mdp
cd mdp
RELEASE=1 make
Build artifacts will be placed in 'obj' dir, if you have not defined OBJ_DIR.
DST_DIR variable can be used to define prefix (must be absolute) path for:
- $DST_DIR/bin
- $DST_DIR/lib // zmqpp
- $DST_DIR/include // zmqpp
RELEASE=1 DST_DIR=$HOME/opt make install
git clone https://github.com/wdl83/mdp
cd mdp
./make_env.sh # generate .env
sudo docker-compose up
grep DST= .env # directory where artifacts are located
Build artifacts will be placed in $DST dir (generated with mktemp -d).
Broker requires the IP address and listen port. Running manually from console:
broker -a tcp://0.0.0.0:6060
or better as systemd service. Create .config/systemd/user/broker.service
# this config assumes you installed:
# broker in $HOME/bin
# libzmqpp.so* libraries in $HOME/lib
#
[Unit]
Description=MDP Broker
[Service]
Environment=TRACE_LEVEL=2
Environment=LD_LIBRARY_PATH=$HOME/lib/:$LD_LIBRARY_PATH
ExecStart=$HOME/bin/broker -a tcp://0.0.0.0:6060
Restart=on-failure
RestartSec=10s
[Install]
WantedBy=default.target
After systemd service file is created enable it:
systemctl --user enable broker.service
and start
systemctl --user start broker.service
Enable systemd to start $USER services at boot (no $USER login required)
loginctl enable-linger $USER