Mosquitto (http://mosquitto.org)
Mosquitto-Auth-Plugin (https://github.com/jpmens/mosquitto-auth-plug#ldap-auth)
1. Install Mosquitto from ports
$cd /usr/ports/net/mosquitto/ $make config $make install
$ls -d /usr/ports/net/mosquitto/work/mosquitto-* /usr/ports/net/mosquitto/work/mosquitto-1.5.8 (remember it)2. Install openldap client from ports
$cd /usr/ports/net/openldap24-client $make config $make install $make clean3. Check openssl lib
$openssl version OpenSSL 1.0.2o-freebsd 27 Mar 20184. Compile Mosquitto from git
$pkg install git $cd ~ $git clone git://github.com/jpmens/mosquitto-auth-plug.git $cd mosquitto-auth-plug/4.1. edit config.mk
cp config.mk.in config.mk
MOSQUITTO_SRC = /usr/ports/net/mosquitto/work/mosquitto-1.5.8 OPENSSLDIR = /usr/bin BACKEND_MYSQL ?= no BACKEND_LDAP ?= yesCopmile path on config.mk or Makefile
CFG_LDFLAGS =-L/usr/local/lib CFG_CFLAGS =-I/usr/local/includeor edit Makefile
BE_CFLAGS = -I/usr/local/include BE_LDFLAGS = -L/usr/local/lib/or run comadns for replace
sed 's#MOSQUITTO_SRC =#MOSQUITTO_SRC = /usr/ports/net/mosquitto/work/mosquitto-1.5.8#' config.mk.in > config.mk sed -i "" 's#OPENSSLDIR = /usr#OPENSSLDIR = /usr/bin#' config.mk sed -i "" 's#BACKEND_MYSQL ?= yes#BACKEND_MYSQL ?= no#' config.mk sed -i "" 's#BACKEND_LDAP ?= no#BACKEND_LDAP ?= yes#' config.mk sed -i "" 's#CFG_LDFLAGS =#CFG_LDFLAGS =-L/usr/local/lib#' config.mk sed -i "" 's#CFG_CFLAGS =#CFG_CFLAGS =-I/usr/local/include#' config.mk sed -i "" 's#BE_CFLAGS =#BE_CFLAGS = -I/usr/local/include#' Makefile sed -i "" 's#BE_LDFLAGS =#BE_LDFLAGS = -L/usr/local/lib/#' Makefile4.2 Compile
$pkg install gmake $qmake
FreeBSD compile Mosquitto-Auth-Plugin |