Install script for Linux and Mac

Script installation guide for Linux and Mac

May 26th, 2020

An automatic installation script is available for Linux and Mac. This script is interactive and will:

  • Create a user for Mango to run under (Linux only)
  • Create a H2 or MySQL database
  • Download and extract the Mango zip file to your chosen installation directory
  • Create a pre-configured file in overrides
  • Create a self-signed SSL/TLS certificate
  • Register a systemd service so Mango starts at boot (Linux only)


  • Your operating system is Linux or macOS
  • At least Java JDK 8 (1.8) is installed and at least one of the following two conditions is true:
    • JAVA_HOME environment variable points to the JDK installation directory
    • The JDK bin directory is available on your path (specifically the java, keytool, and jar commands are available)
  • (MySQL only) The mysql command is available on the path and the root user can run SQL without a password


You must run the script as root. If you have any reservations about doing so, please see our manual installation instructions for your operating system.

Download the script

curl -o

Run the script

If logged in as root:


Using sudo to run the script as root:

sudo sh

Answer the prompts

The script will prompt you to enter details about where to install Mango, which version of Mango to install etc. Hit enter and accept the default option shown inside the square brackets [default]. Yes/no answers must be written as ‘yes’ or ‘no’, ‘y’ or ‘n’ are not sufficient.

Advanced options

You can automate the script by providing answers to the prompts using environment variables. e.g.

MA_HOME=/opt/mango MA_USER=mango MA_DB_TYPE=h2 MA_VERSION=4.0.0 sh

Environment variables

  • MA_HOME — The directory in which to install Mango
  • MA_USER — The OS username under which Mango will run (will be created if user doesn’t exist)
  • MA_SERVICE_NAME — The systemd service name which will be installed
  • MA_DB_TYPE — The SQL database type for the installation [h2/mysql]
  • MA_DB_NAME — The SQL database name which will be created
  • MA_DB_USER — The SQL database user (will be created if user doesn’t exist)
  • MA_DB_PASSWORD — The SQL database user’s password
  • MA_CONFIRM_DROP — Confirms that the SQL DB should be dropped (MySQL only) [yes/no]
  • MA_CONFIRM_DELETE — Confirms that the contents of the installation directory can be deleted [yes/no]
  • MA_CORE_ZIP — Path to a installation zip file to use instead of downloading one
  • MA_VERSION — The version of Mango to install e.g. 4.0.0 or 3.7.7

Copyright © 2020 Radix IoT, LLC.