Skip to content

Instantly share code, notes, and snippets.

@inecmc
Last active August 18, 2020 09:19
Show Gist options
  • Save inecmc/8d6f085779855ffdf4d10aba35ed55b3 to your computer and use it in GitHub Desktop.
Save inecmc/8d6f085779855ffdf4d10aba35ed55b3 to your computer and use it in GitHub Desktop.
Compile mosquitto-auth-plug on Ubuntu 16.04
sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto         # Install the latest version

sudo apt-get install build-essential libc-ares-dev libc-ares2 libcurl4-openssl-dev libmysqlclient-dev
curl -O http://mosquitto.org/files/source/mosquitto-1.4.11.tar.gz
tar zxf mosquitto-1.4.11.tar.gz
cd mosquito-1.4.11
nano config.mk                         # Edit: disable SRV
# WITH_SRV=no
make mosquito
cd ..
git clone https://github.com/jpmens/mosquitto-auth-plug.git
cd mosquitto-auth-plug
cp config.mk.in config.mk
openssl version -a                     # Get path/to/openssl
nano config.mk                         # Edit: enable backends and specify necessary paths.
# BACKEND_MYSQL ?= yes
# MOSQUITTO_SRC = path/to/mosquitto
# OPENSSLDIR = path/to/openssl
make
sudo cp auth-plug.so /etc/mosquitto/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment