Ubuntu installation EMQ X server Guide

Time:2020-1-14

system requirements

  • Bionic 18.04 (LTS)
  • Xenial 16.04 (LTS)
  • Trusty 14.04 (LTS)
  • Precise 12.04(LTS)

Install EMQ X

  • You can install EMQ X in different ways as needed:

    • Set up and install the image library of EMQ x for installation and upgrade tasks.
    • Download and install the package manually.

Install EMQ X using image library

Before installing EMQ x for the first time on a new host, you need to set up the EMQ X image library. After that, you can install and update EMQ X from the mirror library.

Set up image library

1. updateaptPackage index:

$ sudo apt update

2. Install necessary software:

$ sudo apt install -y \
  apt-transport-https \
  ca-certificates \
  curl \
  gnupg-agent \
  software-properties-common

3. Add the official GPG key of EMQ X:

$ curl -fsSL https://repos.emqx.io/gpg.pub | sudo apt-key add -

Authentication key

$ sudo apt-key fingerprint 3E640D53

pub  rsa2048 2019-04-10 [SC]
        FC84 1BA6 3775 5CA8 487B 1E3C C0B4 0946 3E64 0D53
uid     [ unknown] emqx team <[email protected]>

4. Use the following command to setstableImage library. To addunstableAdd the word unstable after the word stable in the following command.

Be careful: the following LSB [release – CS subcommand returns the name of the Ubuntu distribution, such as xenial. Sometimes in a distribution like Linux mint, you may need to change $(lsb_release – CS) to the parent Ubuntu distribution. For example, if you are using Linux Mint Tessa, you can use bionic. EMQ X does not guarantee untested and unsupported Ubuntu distributions.

$ sudo add-apt-repository \
  "deb [arch=amd64] https://repos.emqx.io/emqx-ce/deb/ubuntu/ \
  $(lsb_release -cs) \
  stable"

Install EMQ X

1. updateaptPackage index:

$ sudo apt update

2. Install the latest version of EMQ x, or go to the next step to install a specific version:

$ sudo apt install emqx

If multiple EMQ X image libraries are enabled, theapt installorapt updateThe highest possible version will always be installed when no version is specified in the command, which may not be suitable for stability requirements.

3. To install a specific version of EMQ x, you need to list the available versions, and then select and install:

Query available versions

$ sudo apt-cache madison emqx

emqx |  3.1.0 | https://repos.emqx.io/emqx-ce/deb/ubuntu bionic/stable amd64 Packages
emqx |  3.0.1 | https://repos.emqx.io/emqx-ce/deb/ubuntu bionic/stable amd64 Packages
emqx |  3.0.0 | https://repos.emqx.io/emqx-ce/deb/ubuntu bionic/stable amd64 Packages

Install a specific version using the version string in the second column, for example3.1.0

$ sudo apt install emqx=3.1.0 

4. Start EMQ x

$ emqx start emqx 3.1 is started successfully! $ emqx_ctl status Node '[email protected]' is started emqx v3.1.0 is running 

5. EMQ x is started successfully. Please refer to the official documents for how to use it

Install EMQ x with installation package

If you cannot use the image library of EMQ x to install EMQ x, you can download.debDocuments or.zipFile and install it manually.

from.debFile installation

1. turn toemqx.ioOr GitHub, select Ubuntu version, and download the.debPapers.

2. Install EMQ X and change the following path to download the EMQ x package.

$ sudo dpkg -i /path/to/emqx-ubuntu18.04-v3.1.0_amd64.deb 

3. Start EMQ x

$ emqx start emqx 3.1 is started successfully! $ emqx_ctl status Node '[email protected]' is started emqx v3.1.0 is running 

4. EMQ x started successfully. Please refer to the official documents for how to use it

from.zipFile installation

1. turn toemqx.ioOr GitHub, select Ubuntu version, and download the.zipPapers.

2. Decompress the compressed package and change the path below to the path to download the EMQ x package.

$ unzip /path/to/emqx-ubuntu18.04-v3.1.0.zip 

3. Start EMQ x

$ cd emqx $ ./bin/emqx start emqx 3.1 is started successfully! $ ./bin/emqx_ctl status Node '[email protected]' is started emqx v3.1.0 is running 

4. EMQ x started successfully. Please refer to the official documents for how to use it


For more information, please visit our official website emqx.io, or follow our open source project github.com/emqx/emqx. For detailed documents, please visit the official documents.

Ubuntu installation EMQ X server Guide