Amazon Linux 2

This section guides you on installing and starting EMQX on Amazon Linux 2.

Install with rpm

EMQX offers different installation packages for different CPU architectures.

  1. Download emqx-5.1.0-amzn2-amd64.rpmAmazon Linux 2 - 图1 (opens new window).

    1. wget https://www.emqx.com/en/downloads/broker/5.1.0/emqx-5.1.0-amzn2-amd64.rpm
  2. Install EMQX.

    1. sudo yum install emqx-5.1.0-amzn2-amd64.rpm -y
  3. Download emqx-5.1.0-amzn2-arm64.rpmAmazon Linux 2 - 图2 (opens new window).

    1. wget https://www.emqx.com/en/downloads/broker/5.1.0/emqx-5.1.0-amzn2-arm64.rpm
  4. Install EMQX.

    1. sudo yum install emqx-5.1.0-amzn2-arm64.rpm -ys

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 has offered unique installation packages for different CPU architectures.

  1. Download emqx-5.1.0-elixir-amzn2-amd64.tar.gzAmazon Linux 2 - 图3 (opens new window).

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

    1. mkdir -p emqx && tar -zxvf emqx-5.1.0-elixir-amzn2-amd64.tar.gz -C emqx
  3. Download emqx-5.1.0-amzn2-arm64.tar.gzAmazon Linux 2 - 图4 (opens new window).

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

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

Start EMQX

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

  1. ./emqx/bin/emqx start