Difference between revisions of "Mosquitto from Source"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
Line 21: Line 21:
** <code>cp uthash/src/* mosquitto/include</code>
** <code>cp uthash/src/* mosquitto/include</code>
* # '''For testeng'''
* # '''For testeng'''
** <code>git clone https://gitlab.com/cunity/cunit.git</code>
** <code>git clone <nowiki>https://gitlab.com/cunity/cunit.git</nowiki></code>
** <code>cd cunit</code>
** <code>mkdir local-build</code>
** <code>mkdir local-build</code>
** <code>cd local-build</code>
** <code>cd local-build</code>

Revision as of 19:50, 1 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 testeng
    • 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

Install it:

  • sudo make install

To be done:

Configure it:

Use it: