Ubuntu Installation EMQ X Server Guide

Posted by timvw on Fri, 02 Aug 2019 13:17:02 +0200

system requirements

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

Installation of EMQ X

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

    • Set up and install EMQ X's image library to facilitate installation and upgrade tasks.
    • Manually download and install the package.

Installation of EMQ X with Mirror Library

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

Setting up Mirror Library

1. Update apt package index:

$ sudo apt update

2. Install the 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 -

Verification 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 <support@emqx.io>

4. Use the following commands to set up the stable image library. To add an unstable mirror library, add the word unstable after the word stable in the following command.

Note: The following lsb_release-cs subcommand returns the name of the Ubuntu distribution, such as xenial. Sometimes in distributions like Linux Mint, you may need to change $(lsb_release-cs) to the parent Ubuntu distribution. For example, if you use Linux Mint Tessa, you can use bionic. EMQ X does not provide any guarantee for untested and unsupported Ubuntu distributions.

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

Installation of EMQ X

1. Update apt package 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, the highest possible version will always be installed without specifying the version in apt install or apt update commands, 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, such as 3.1.0, using the version string in the second column

$ sudo apt install emqx=3.1.0 

4. Start EMQ X

$ emqx start emqx 3.1 is started successfully! $ emqx_ctl status Node 'emqx@127.0.0.1' is started emqx v3.1.0 is running 

5.EMQ X started successfully, how to use it please refer to Official Documents

Installing EMQ X with Installation Package

If you cannot install EMQ X using EMQX's mirror library, you can download the. deb file or. zip file and install it manually.

Install from. deb file

1. Go to emqx.io or github, select the Ubuntu version, and download the. deb file for the EMQ X version to be installed.

2. Install EMQ X and change the following path to download the EMQX 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 'emqx@127.0.0.1' is started emqx v3.1.0 is running 

4.EMQ X started successfully. Please refer to the official documentation for how to use it.

Installation from.zip file

1. Go to emqx.io or github, select the Ubuntu version, and download the. zip file for the EMQ X version to be installed.

2. Decompress the compressed package and change the following 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 'emqx@127.0.0.1' is started emqx v3.1.0 is running 

4.EMQ X started successfully, how to use it please refer to Official Documents

For more information, please visit our official website emqx.io Or focus on our open source projects github.com/emqx/emqx For detailed documentation, please visit Official Documents.

Topics: Linux sudo Ubuntu github curl