The article directories

  • 1. EMQ X
    • EMQ X and EMQTTD
    • Protocols supported by EMQ X
    • Deployment platforms supported by EMQ X
  • 2. Deploy using the ZIP package
    • Get the zip package download link
    • Downloading software Packages
    • Unpack the zip package
    • Start the EMQ X
  • 3. Deploy using Docker
    • Install the docker
    • Get the Docker image
    • Start the Docker container
    • Stop the Docker service
  • 4. Access the DashBoard and perform simple Settings
    • Access to the DashBoard
    • Language and theme Settings
    • User Settings

1. EMQ X

EMQ X and EMQTTD

EMQ X full Erlang/Enterprise/Elastic MQTT Broker, it is based on the Erlang/OTP language platform development, support the large-scale connection and distributed cluster, publish-subscribe pattern of millions of open source MQTT message server.

Speaking of EMQ-X, the other predecessor is the EMQTTD message server, renamed EMQ-X since version 3.0 of EMQTTD.

Protocols supported by EMQ X

EMQ X messaging server fully supports MQTT V3.1/V3.1.1/V5.0 protocol specifications and extends support for MQTT-SN, WebSocket, CoAP, LwM2M, Stomp and private TCP/UDP protocols.

Mqtt-sn and CoAP protocols have been released in version 2.0-RC. 1, while LwM2M and LoRaWan protocols have been released in version 3.0.

Deployment platforms supported by EMQ X

Each version of EMQ X provides software packages for the following platforms:

  • Linux: CentOS, Ubuntu, Debian, FreeBSD, OpenSUSE
  • MacOS
  • Windows

During deployment, you can download the ZIP package from the official download link, decompress it, and run it directly.

In addition, EMQ X also provides Docker images that can be deployed directly in Docker.

For the deployment methods of each platform, you can refer to the official deployment documents. This article only describes how to deploy in ZIP mode and docker mode on the Linux server. The Tencent cloud server used in this article is configured with 1 core 2G and the system is Ubuntu 18.04 64-bit.

2. Deploy using the ZIP package

Using V3.1.0, other higher version tests have problems!

Get the zip package download link

Visit the official download link, select the version and system you want to download, and then copy the download link:

Downloading software Packages

Log in to the cloud server and use the wGET tool to download:

Wget < download link just copied >Copy the code

For example, my download command is:

Wget HTTP: / / https://www.emqx.io/downloads/broker/v3.1.0/emqx-ubuntu18.04-v3.1.0.zipCopy the code

Unpack the zip package

Use the unzip tool to decompress the ZIP package. Run the following command to check whether unzip is installed:

unzip -v
Copy the code

It is installed on my computer, so the query result is shown as follows:

If no, run the following command to install it:

sudo apt-get install unzip
Copy the code

Once you have unzip installed, unzip the package you just downloaded:

Unzip e< Tab auto-complete >Copy the code

Start the EMQ X

Enter the decompressed folder:

cd emqx
Copy the code

Then use the following command to start EMQx:

sudo ./bin/emqx start
Copy the code

After successful startup, see the following figure:

Check the status of EMQX to see if it really started successfully:

sudo ./bin/emqx_ctl status
Copy the code

Special note: if the cloud server has security group configuration by default (Ali Cloud), or the pagoda panel is enabled, be sure to allow the following TCP ports.

The EMQ X message server uses the following TCP ports by default:

port instructions
1883 MQTT protocol port
8883 MQTT/SSL port
8083 MQTT/WebSocket port
8080 The HTTP API port
18083 Dashboard management console port

You can then skip to section 4 and log in to the control panel at the back.

3. Deploy using Docker

Install the docker

See my blog: how to install, update, and uninstall the latest version of docker-ce on Ubuntu18.04.

Get the Docker image

Obtain Docker image from Docker Hub:

Sudo docker pull emqx/emqx: v3.0.1Copy the code

Start the Docker container

Start the Docker container with the following command:

Sudo docker run -d --name emqx31 -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 emqx/emqx:v3.0.1Copy the code

After startup, see the following figure:

Check whether the docker process is running:

sudo docker ps
Copy the code

Special note: if the cloud server has security group configuration by default (Ali Cloud), or the pagoda panel is enabled, be sure to allow the following TCP ports.

The EMQ X message server uses the following TCP ports by default:

port instructions
1883 MQTT protocol port
8883 MQTT/SSL port
8083 MQTT/WebSocket port
8080 The HTTP API port
18083 Dashboard management console port

Stop the Docker service

If emq-x is not needed, run the following command to stop the Docker service:

Sudo docker stop sudo docker stopCopy the code

As shown in figure:

4. Access the DashBoard and perform simple Settings

Access to the DashBoard

To access the emQ-X login page, visit http://< server IP address or domain name >:18083. Use user name admin and password public to log in:

After successful login, the background interface is shown as follows:

Language and theme Settings

The default is English and dark-themes, which can be changed on the Setting screen:

The Chinese interface is as follows:

User Settings

The login panel just uses the default user name and password, which can be changed in the user interface for security purposes: