Install EMQX on CentOS/RHEL
This page guides you on installing and starting EMQX on a CentOS/RHEL system.
Supported versions:
- Amazon Linux 2023
- Rocky Linux 10 (RHEL 10)
- Rocky Linux 9 (RHEL 9)
- Rocky Linux 8 (RHEL 8)
The following sections demonstrate how to download the latest version of EMQX from the official download site. For installation on other systems or to install other versions, visit the EMQX Enterprise download site for detailed information.
TIP
Starting from EMQX 6.3.0, RPM installations support the same /opt/emqx/... paths as the Docker image. For the path mappings, see Files and Directories.
Install with rpm
- Go to the official download page and select the CentOS/RHEL tab.
- Select the latest version
6.3.0. From the Package Type dropdown, select therpmpackage that matches your RHEL-compatible distribution version and CPU architecture. - Click the link below to download. You can also follow the command-line guide steps for downloading and installing.
Start EMQX
Start EMQX as a systemd service.
sudo systemctl start emqxTIP
Starting from EMQX 6.3.0, set boot-time environment variables such as EMQX_SECURITY_PROFILE in /etc/emqx/emqx.env. The emqx command loads this file whenever it runs, including during a service start, a foreground start, and emqx ctl. Package upgrades preserve your changes to this file. Restart the EMQX node to apply changes to boot-time environment variables. See Boot-Time Environment Variables.
Uninstall EMQX
To uninstall EMQX, run:
sudo yum remove emqxInstall with tar.gz
- Go to the official download page and select the CentOS/RHEL tab.
- Select the latest version
6.3.0. From the Package Type dropdown, select thetar.gzpackage that matches your RHEL-compatible distribution version and CPU architecture. - Click the link below to download. You can also follow the command-line guide steps for downloading and installing.
Start EMQX
After the installation, run the command below to start EMQX.
./emqx/bin/emqx foreground