MQTT Mosquitto Broker: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 3: | Zeile 3: | ||
*apt install mosquitto | *apt install mosquitto | ||
*apt install mosquitto-clients | *apt install mosquitto-clients | ||
| + | = Handleling= | ||
| + | *systemctl start mosquitto.service | ||
| + | *systemctl restart mosquitto.service | ||
| + | *systemctl stop mosquitto.service | ||
| + | *systemctl status mosquitto.service | ||
| + | *journalctl -fu mosquitto.service | ||
=Die Konfiguration erfolgt in der Datei '''/etc/mosquitto/conf.d/defaults.conf'''= | =Die Konfiguration erfolgt in der Datei '''/etc/mosquitto/conf.d/defaults.conf'''= | ||
Aktuelle Version vom 30. Oktober 2024, 10:27 Uhr
Installiere den Broker
- apt update && apt-get upgrade
- apt install mosquitto
- apt install mosquitto-clients
Handleling
- systemctl start mosquitto.service
- systemctl restart mosquitto.service
- systemctl stop mosquitto.service
- systemctl status mosquitto.service
- journalctl -fu mosquitto.service
Die Konfiguration erfolgt in der Datei /etc/mosquitto/conf.d/defaults.conf
Unsicher ohne Passwort
listener 1883 0.0.0.0 allow_anonymous true log_type all connection_messages true
Unverschlüsselt mit Passwort
listener 1883 0.0.0.0 allow_anonymous false log_type all connection_messages true password_file /etc/mosquitto/passwd
Verschlüsselt mit Passwort
listener 8883 0.0.0.0 allow_anonymous false log_type all connection_messages true password_file /etc/mosquitto/passwd certfilev /etc/mosquitto/conf.d/FQDN.crt cafile /etc/mosquitto/conf.d/ca.crt keyfile /etc/mosquitto/conf.d/FQDN.key
Verschlüsselt mit Passwort und Client Identifikation
listener 8883 0.0.0.0 allow_anonymous false log_type all connection_messages true password_file /etc/mosquitto/passwd certfilev /etc/mosquitto/conf.d/FQDN.crt cafile /etc/mosquitto/conf.d/ca.crt keyfile /etc/mosquitto/conf.d/FQDN.key require_certificate true use_identity_as_username true