Difference between revisions of "Beaglebone Black/Mosquitto"
From Teknologisk videncenter
(Created page with "=Install from git= • apt-get update # Better safe than sorry • apt-get install libssl-dev • apt-get install docbook docbook-xml docbook-xsl • apt-get install xsltproc...") |
m |
||
Line 1: | Line 1: | ||
=Install from git= | =Install from git= | ||
− | + | #apt-get update # Better safe than sorry | |
− | + | #apt-get install libssl-dev | |
− | + | #apt-get install docbook docbook-xml docbook-xsl | |
− | + | #apt-get install xsltproc | |
− | + | #apt-get install libsystemd-dev | |
− | + | #apt install libcjson1 libcjson-dev | |
− | + | #git clone https://github.com/eclipse/mosquitto.git | |
− | + | #cd mosquitto | |
+ | #vi config.mk – set WITH_SYSTEMD:=yes | ||
+ | #make all | ||
+ | #make install | ||
+ | #adduser –system mosquitto # Bemærk det er ”-”-”system | ||
+ | #ln /usr/local/lib/libmosquitto.so.1 /usr/lib/arm-linux-gnueabihf/ | ||
+ | #Da vi er på debian en systemd implementation øsnker vi at installere service under systemd | ||
+ | ##(DONE)Apt-get install libsystemd-dev | ||
+ | ##(DONE)vi config.mk – set WITH_SYSTEMD:=yes | ||
+ | ##cp /home/debian/mosquitto/service/systemd/mosquitto.service.simple /etc/systemd/system/mosquitto.service | ||
+ | ##ln /usr/local/sbin/mosquitto /usr/sbin/ | ||
+ | ##> /etc/mosquitto/mosquitto.conf # Opret tom config fil (se eksempel fil) | ||
+ | ##systemctl enable mosquitto.service | ||
+ | ##service mosquitto start | ||
+ | ##service mosquitto status | ||
+ | ##Genstart og se den er startet automatisk | ||
+ | ##Check grundlæggende installation | ||
+ | ##mosquitto –v # i en terminal (Brooker) | ||
+ | ##mosquitto_sub -h localhost –t "temperatur/sommerhus/stue" # i anden terminal (client/subscriber) brug evt -d for debug (Se alle feltet) | ||
+ | ##mosquitto_pub -h localhost -t "temperatur/sommerhus/stue" -m "24" # i tredje terminal (client/publisher) |
Revision as of 07:58, 1 April 2022
Install from git
- apt-get update # Better safe than sorry
- apt-get install libssl-dev
- apt-get install docbook docbook-xml docbook-xsl
- apt-get install xsltproc
- apt-get install libsystemd-dev
- apt install libcjson1 libcjson-dev
- git clone https://github.com/eclipse/mosquitto.git
- cd mosquitto
- vi config.mk – set WITH_SYSTEMD:=yes
- make all
- make install
- adduser –system mosquitto # Bemærk det er ”-”-”system
- ln /usr/local/lib/libmosquitto.so.1 /usr/lib/arm-linux-gnueabihf/
- Da vi er på debian en systemd implementation øsnker vi at installere service under systemd
- (DONE)Apt-get install libsystemd-dev
- (DONE)vi config.mk – set WITH_SYSTEMD:=yes
- cp /home/debian/mosquitto/service/systemd/mosquitto.service.simple /etc/systemd/system/mosquitto.service
- ln /usr/local/sbin/mosquitto /usr/sbin/
- > /etc/mosquitto/mosquitto.conf # Opret tom config fil (se eksempel fil)
- systemctl enable mosquitto.service
- service mosquitto start
- service mosquitto status
- Genstart og se den er startet automatisk
- Check grundlæggende installation
- mosquitto –v # i en terminal (Brooker)
- mosquitto_sub -h localhost –t "temperatur/sommerhus/stue" # i anden terminal (client/subscriber) brug evt -d for debug (Se alle feltet)
- mosquitto_pub -h localhost -t "temperatur/sommerhus/stue" -m "24" # i tredje terminal (client/publisher)