Difference between revisions of "Mosquitto from Source"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
Line 45: Line 45:


* <code>sudo make install</code>
* <code>sudo make install</code>
=  
= '''<span style="color: rgb(186, 55, 42); text-decoration: underline;">To be done:</span>'''=
<span style="text-decoration: underline;">'''<span style="color: rgb(186, 55, 42); text-decoration: underline;">To be done:</span>'''</span> =


== '''<span style="color: rgb(132, 63, 161);">Configure it:</span>''' ==
== '''<span style="color: rgb(132, 63, 161);">Configure it:</span>''' ==


== '''<span style="color: rgb(132, 63, 161);">Use it:</span>''' ==
== '''<span style="color: rgb(132, 63, 161);">Use it:</span>''' ==

Revision as of 00:58, 2 March 2024

The required tools:

  • apt install git build-essential autoconf cmake

Get the source:

  • git clone https://github.com/eclipse/mosquitto.git

The prerequisites:

  • apt install libc-ares-dev libwebsockets-dev libssl-dev xsltproc docbook-xsl libsystemd-dev libwrap0-dev openssl
  • # cJSON
    • git clone https://github.com/DaveGamble/cJSON
    • cd cJSON
    • mkdir build
    • cd build
    • cmake ..
    • make
    • sudo make install
    • cd ../..
  • # uthash / utlist
    • git clone https://github.com/troydhanson/uthash
    • cp uthash/src/* mosquitto/include
  • # For testing
    • apt install python3-psutil
    • git clone https://gitlab.com/cunity/cunit.git
    • cd cunit
    • mkdir local-build
    • cd local-build
    • cmake ..
    • cmake --build .
    • sudo make install
    • cd ../..

Build it:

  • cd mosquitto
  • make

Test it:

  • make test
  • make check

Install it:

  • sudo make install

To be done:

Configure it:

Use it: