Difference between revisions of "Beaglebone Black/Mosquitto"

From Teknologisk videncenter
Jump to: navigation, search
(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 update # Better safe than sorry
apt-get install libssl-dev
+
#apt-get install libssl-dev
apt-get install docbook docbook-xml docbook-xsl
+
#apt-get install docbook docbook-xml docbook-xsl
apt-get install xsltproc
+
#apt-get install xsltproc
• Apt-get install libsystemd-dev
+
#apt-get install libsystemd-dev
apt install libcjson1 libcjson-dev
+
#apt install libcjson1 libcjson-dev
git clone https://github.com/eclipse/mosquitto.git
+
#git clone https://github.com/eclipse/mosquitto.git
cd mosquitto
+
#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 08:58, 1 April 2022

Install from git

  1. apt-get update # Better safe than sorry
  2. apt-get install libssl-dev
  3. apt-get install docbook docbook-xml docbook-xsl
  4. apt-get install xsltproc
  5. apt-get install libsystemd-dev
  6. apt install libcjson1 libcjson-dev
  7. git clone https://github.com/eclipse/mosquitto.git
  8. cd mosquitto
  9. vi config.mk – set WITH_SYSTEMD:=yes
  10. make all
  11. make install
  12. adduser –system mosquitto # Bemærk det er ”-”-”system
  13. ln /usr/local/lib/libmosquitto.so.1 /usr/lib/arm-linux-gnueabihf/
  14. Da vi er på debian en systemd implementation øsnker vi at installere service under systemd
    1. (DONE)Apt-get install libsystemd-dev
    2. (DONE)vi config.mk – set WITH_SYSTEMD:=yes
    3. cp /home/debian/mosquitto/service/systemd/mosquitto.service.simple /etc/systemd/system/mosquitto.service
    4. ln /usr/local/sbin/mosquitto /usr/sbin/
    5. > /etc/mosquitto/mosquitto.conf # Opret tom config fil (se eksempel fil)
    6. systemctl enable mosquitto.service
    7. service mosquitto start
    8. service mosquitto status
    9. Genstart og se den er startet automatisk
    10. Check grundlæggende installation
    11. mosquitto –v # i en terminal (Brooker)
    12. mosquitto_sub -h localhost –t "temperatur/sommerhus/stue" # i anden terminal (client/subscriber) brug evt -d for debug (Se alle feltet)
    13. mosquitto_pub -h localhost -t "temperatur/sommerhus/stue" -m "24" # i tredje terminal (client/publisher)