This is an old revision of the document!

Recipe for MQTT Server

VM - 15 GB HDD, 1024 MB RAM, 1 socket/2 cores

  • base netinst install of stretch (64-bit) - deselect everything from tasksel
    • hostname mqtt – domain mcp.lcl
    • auto-partition (single partition)
  • > /etc/motd
  • apt-get --no-install-recommends install aptitude
  • aptitude install ssh (deselect xauth)
  • aptitude install screen rsync psmisc file patch ethtool strace tcpdump vim less
  • aptitude --without-recommends install dnsutils
  • adduser tdobes adm
  • aptitude install dbus
  • mkdir -p /etc/systemd/system/getty\@tty1.service.d
    echo '[Service]' > /etc/systemd/system/getty\@tty1.service.d/noclear.conf
    echo 'TTYVTDisallocate=no' >> /etc/systemd/system/getty\@tty1.service.d/noclear.conf
  • systemctl mask keyboard-setup.service
    systemctl mask console-setup.service
    systemctl mask rc-local.service
  • aptitude install mosquitto
  • systemctl disable apparmor # mosquitto depends on apparmor, but we're not using it
  • aptitude install mosquitto-clients
  • echo 'listener 1883' > /etc/mosquitto/conf.d/listen-mqtt.conf
    echo 'protocol mqtt' >> /etc/mosquitto/conf.d/listen-mqtt.conf
    echo 'listener 8000' > /etc/mosquitto/conf.d/listen-websockets.conf
    echo 'protocol websockets' >> /etc/mosquitto/conf.d/listen-websockets.conf
  • aptitude install python
  • wget
    dpkg -i python-mosquitto_1.3.4-2_all.deb

TODO: Write systemd unit file for mosquitto; set to auto-restart. (Can sometimes segfault due to libwebsockets.)

computer/mqtt_server.1458162898.txt.gz · Last modified: 2016/03/16 16:14 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS