Инструменты пользователя

Инструменты сайта


freebsd:mosquitto

Это старая версия документа!


FreeBSD установка mosquitto

Перехожу в порт и устанавливаю.

cd /usr/ports/net/mosquitto 
# make install clean
------------------------------ mosquitto-1.4.10 -------------------------------¬
¦ ---------------------------------------------------------------------------¬ ¦
¦ ¦+[x] WS  MQTT over Websockets support                                     ¦ ¦
¦ L--------------------------------------------------------------------------- ¦
+------------------------------------------------------------------------------+
¦                       <  OK  >            <Cancel>                           ¦
L-------------------------------------------------------------------------------
------------------------------- c-ares-1.12.0 ---------------------------------¬
¦ ---------------------------------------------------------------------------¬ ¦
¦ ¦+[x] CONFIG_INFO       Add the ares_config_info patch                     ¦ ¦
¦ ¦+[ ] DEBUG             Build with debugging support                       ¦ ¦
¦ ¦+[x] HIDE_SYMBOLS      Hide internal library symbols                      ¦ ¦
¦ ¦+[ ] OPTIMIZED_CFLAGS  Build with compiler optimizations                  ¦ ¦
¦ L--------------------------------------------------------------------------- ¦
+------------------------------------------------------------------------------+
¦                       <  OK  >            <Cancel>                           ¦
L-------------------------------------------------------------------------------
---------------------------- libwebsockets-2.0.2 ------------------------------¬
¦ ---------------------------------------------------------------------------¬ ¦
¦ ¦+[x] HTTP2       HTTP protocol version 2.0 support                        ¦ ¦
¦ ¦+[ ] HTTP_PROXY  HTTP proxy support                                       ¦ ¦
¦ ¦+[ ] IPV6        IPv6 protocol support                                    ¦ ¦
¦ ¦+[ ] LIBEV       High-performance events support via libev                ¦ ¦
¦ ¦+[ ] LIBUV       Asynchronous I/O support via libuv                       ¦ ¦
¦ ¦+[x] UNIX_SOCK   Unix domain socket support                               ¦ ¦
¦ ¦+[x] WEBSERVER   Build and/or install internal web server                 ¦ ¦
¦ L--------------------------------------------------------------------------- ¦
+------------------------------------------------------------------------------+
¦                       <  OK  >            <Cancel>                           ¦
L-------------------------------------------------------------------------------
===> SECURITY REPORT:
    This port has installed the following files which may act as network
    servers and may therefore pose a remote security risk to the system.
/usr/local/bin/mosquitto_passwd
/usr/local/sbin/mosquitto
/usr/local/lib/libmosquitto.so.1.4.10

    This port has installed the following startup scripts which may cause
    these network services to be started at boot time.
/usr/local/etc/rc.d/mosquitto

    If there are vulnerabilities in these programs there may be a security
    risk to the system. FreeBSD makes no guarantee about the security of
    ports included in the Ports Collection. Please type 'make deinstall'
    to deinstall the port if this is a concern.

    For more information, and contact details about the security
    status of this software, see the following webpage:
http://mosquitto.org/
===>  Cleaning for c-ares-1.12.0
===>  Cleaning for libwebsockets-2.0.2
===>  Cleaning for libuv-1.10.0
===>  Cleaning for mosquitto-1.4.10

Конфигурационный файл находиться /usr/local/etc/mosquitto/mosquitto.conf

С помощью утилиты mosquitto_passwd создаю файл паролей passwd с логином и паролем для подключения к серверу.

# mosquitto_passwd -c /usr/local/etc/mosquitto/passwd esp8266
Password:
Reenter password:

Запускаю mosquitto.

# /usr/local/etc/rc.d/mosquitto onestart

Проверяю

ps -ax | grep mosquitto
10552 ??  Ss       3:47,77 /usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf -d

sockstat | grep 1883
nobody   mosquitto  10552 3  tcp4   10.215.130.1:1883     *:*
nobody   mosquitto  10552 4  tcp4   10.215.130.1:1883     10.215.130.186:3387
mosquitto_enable="YES"
freebsd/mosquitto.1639243760.txt.gz · Последние изменения: 2021/12/11 17:29 — alex