Skip to content

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.0.26-amzn2-amd64.rpm.

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

    bash
    sudo yum install emqx-5.0.26-amzn2-amd64.rpm -y

Start EMQX

EMQX offers 3 different options to start EMQX:

  • To start EMQX directly, run:

    bash
    $ emqx start
    EMQX 5.0.26 is started successfully!
    
    $ emqx_ctl status
    Node 'emqx@127.0.0.1' 5.0.26 is started
  • To start EMQX with systemctl, run:

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

    bash
    sudo service emqx start

Uninstall EMQX

To uninstall EMQX, run:

sudo apt remove --purge emqx

Install with tar.gz

EMQX has offered unique installation packages for different CPU architectures.

  1. Download emqx-5.0.26-elixir-amzn2-amd64.tar.gz.

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

    bash
    mkdir -p emqx && tar -zxvf emqx-5.0.26-elixir-amzn2-amd64.tar.gz -C emqx

Start EMQX

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

bash
./emqx/bin/emqx start