Inst mosquitto » History » Revision 2
Revision 1 (Michael Gunsch, 01/02/2023 05:37 PM) → Revision 2/9 (Michael Gunsch, 01/02/2023 05:48 PM)
h1. Installation MQTT-Server (Broker) Mosquitto unter Debian
h2. Pakete installieren
<pre><code class="shell">
sudo apt install mosquitto mosquitto-clients
</code></pre>
h2. Konfiguration
/etc/mosquitto/mosquitto.conf
<pre>
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
persistent_client_expiration 30d
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
</pre>
Im Verzeichnis /etc/mosquitto/conf.d werden die Konfigurationsdateien hinterlegt. Die Angaben in spitzen Klammern, wie <host> sind anzupassen, die Spitzen Klammern sind wegzulassen. Beispiele:
/etc/mosquitto/conf.d/andino.conf
<pre>
listener 1883
connection <bridge-name>
address <host>:8883
bridge_cafile /etc/ssl/certs/ISRG_Root_X1.pem
remote_username <username>
remote_password <password>
# topic # out 1 "" <prefix>/
# topic # in 1 <prefix>/ ""
topic # both 1
</pre>