Running HiveMQ in the Cloud

Infrastructure as a Service (IaaS) providers like Amazon Webservices (AWS) and Microsoft Windows Azure are excellent choices for building reliable and scalable infrastructures for your services or platforms. HiveMQ runs perfectly on any cloud infrastructure provider. This chapters covers step-by-step example configurations for popular IaaS providers. The prerequisites for every IaaS provider listed here are that you have a valid account for the desired service.

Running HiveMQ on Amazon Webservices (AWS)

This will explain how to install HiveMQ on a Amazon EC2 instance. The steps may vary when using Windows as operating system.

  1. Navigate to Instances on your EC2 Dashboard in the AWS Management Console.

  2. Click Launch Instance and start the wizard to launch a new instance. Select the Ubuntu 12.04 LTS AMI. [1]

  3. Follow the wizard and configure your EC2 instance.

  4. Create a new Security Group called MQTT with a custom TCP Rule with port 1883.

  5. Enable SSH Access: Create a Security Rule with a custom TCP Rule with port 22.

  6. Finish the wizard to start the EC2 instance creation.

  7. Now connect to your server instance via SSH.

  8. Execute the following command to install all required dependencies:

    sudo apt-get install unzip openjdk-7-jdk
  9. Get your evaluation version from our website.

  10. Copy the provided download link and download HiveMQ

    wget --content-disposition <your download link>
  11. Unzip HiveMQ:

    unzip hivemq-3.x.x.zip
  12. Start HiveMQ:

    cd hivemq-3.x.x
    ./bin/run.sh

Running HiveMQ on Microsoft Azure

This will explain how to install HiveMQ on an Azure Linux VM. The steps may vary when using Windows as operating system.

  1. Create a new Virtual Machine via the Azure Web Interface. Select Ubuntu 12.04 LTS as Image. [1]

  2. After the Virtual Machine was created, we have to open the standard MQTT port which happens to be 1883. Go to the Endpoint Settings of your VM in the Azure Web Interface and create a new Endpoint. Use TCP as protocol and set the public and private port to 1883.

  3. Now connect to your server instance via SSH.

  4. Execute the following command to install all required dependencies:

    sudo apt-get install unzip openjdk-7-jdk
  5. Get your evaluation version from our website.

  6. Copy the provided download link and download HiveMQ

    wget --content-disposition <your download link>
  7. Unzip HiveMQ:

    unzip hivemq-3.x.x.zip
  8. Start HiveMQ:

    cd hivemq-3.x.x
    ./bin/run.sh

1. You can of course use other Linux distributions or Windows. In this case you most likely have to use other tools than apt-get to install the dependencies like Java.