Ubuntu

This section guides you on installing and starting EMQX on the Ubuntu system.

Supported versions:

  • Ubuntu 22.04
  • Ubuntu 20.04
  • Ubuntu 18.04

Install with Apt Source

EMQX supports installing with Apt source to provide our users with a convenient and reliable way to manage EMQX installation and updates. Here is how to install EMQX with Apt source:

  1. Download the EMQX repository:

    1. curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash
  2. Install EMQX:

    1. sudo apt-get install emqx
  3. Start EMQX:

    1. sudo systemctl start emqx

Install with Package

The section below will take Ubuntu 22.04 as an example to illustrate how to download the latest version of EMQX. For other versions, please visit the EMQX Deployment pageUbuntu - 图1 (opens new window).

Install with deb

EMQX offers different installation packages for different CPU architectures.

  1. Download emqx-5.1.0-ubuntu22.04-amd64.debUbuntu - 图2 (opens new window).

    1. wget https://www.emqx.com/en/downloads/broker/5.1.0/emqx-5.1.0-ubuntu22.04-amd64.deb
  2. Install EMQX.

    1. sudo apt install ./emqx-5.1.0-ubuntu22.04-amd64.deb
  3. Download emqx-5.1.0-ubuntu22.04-arm64.debUbuntu - 图3 (opens new window).

    1. wget https://www.emqx.com/en/downloads/broker/5.1.0/emqx-5.1.0-ubuntu22.04-arm64.deb
  4. Install EMQX.

    1. sudo apt install ./emqx-5.1.0-ubuntu22.04-arm64.deb

Start EMQX

EMQX offers 3 different options to start EMQX:

  • To start EMQX directly, run:

    1. $ emqx start
    2. EMQX 5.1.0 is started successfully!
    3. $ emqx_ctl status
    4. Node 'emqx@127.0.0.1' 5.1.0 is started
  • To start EMQX with systemctl, run:

    1. sudo systemctl start emqx
  • To start EMQX as a service, run:

    1. sudo service emqx start

Uninstall EMQX

To uninstall EMQX, run:

  1. sudo apt remove --purge emqx

Install with tar.gz

EMQX offers different installation packages for different CPU architectures.

  1. Download emqx-5.1.0-ubuntu22.04-amd64.tar.gzUbuntu - 图4 (opens new window).

    1. wget https://www.emqx.com/en/downloads/broker/5.1.0/emqx-5.1.0-ubuntu22.04-amd64.tar.gz
  2. Install EMQX.

    1. mkdir -p emqx && tar -zxvf emqx-5.1.0-ubuntu22.04-amd64.tar.gz -C emqx
  3. Download emqx-5.1.0-ubuntu22.04-arm64.tar.gzUbuntu - 图5 (opens new window)

    1. wget https://www.emqx.com/en/downloads/broker/5.1.0/emqx-5.1.0-ubuntu22.04-arm64.tar.gz
  4. Install EMQX.

    1. mkdir -p emqx && tar -zxvf emqx-5.1.0-ubuntu22.04-arm64.tar.gz -C emqx

Start EMQX

After the installation, run the command below to start EMQX.

  1. ./emqx/bin/emqx start