How to Install ActiveMQ Message Broker on Debian 9

Apache ActiveMQ is a free and open source message broker software written in Java that can serve as a central point for communication between distributed processes. Apache ActiveMQ is very powerful, comes with easy to use Enterprise Integration Patterns and supports many language clients and protocols. Apache ActiveMQ comes with a variety of features including, supports AMQP and MQTT, Cross Language Clients and Protocols, support for Enterprise Integration Patterns, supports pluggable transport protocols, designed for high-performance clustering, client-server, peer-based communication and much more.

In this tutorial, we will learn how to install Apache ActiveMQ on Debian 9 server.

Prerequisites

  • A server running Debian 9.
  • A non-root with sudo privileges.

Install Java

ActiveMQ is written in Java, so you will need to install Java 8 to your system. You can install it by just running the following command:

sudo apt-get install default-jdk -y

Once Java is installed, you can check the version of Java using the following command:

java -version

You should see the following output:

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

Install ActiveMQ

Next, you will need to download the latest version of the ActiveMQ. You can download it from their official website with the following command:

wget http://www-us.apache.org/dist//activemq/5.15.3/apache-activemq-5.15.3-bin.tar.gz

Once the download is completed, extract the downloaded file with the following command:

tar -xvzf apache-activemq-5.15.3-bin.tar.gz

Next, copy the extracted directory to the /opt directory:

sudo cp -r apache-activemq-5.15.3 /opt/activemq

Next, start the ActiveMQ service using the following command:

sudo /opt/activemq/bin/activemq start

Next, check whether ActiveMQ is running or not with the following command:

netstat -tulnp | grep java

If everything went fine, you should see the following output:

tcp6 0 0 :::61613 :::* LISTEN 17871/java 
tcp6 0 0 :::61614 :::* LISTEN 17871/java 
tcp6 0 0 :::61616 :::* LISTEN 17871/java 
tcp6 0 0 :::1883 :::* LISTEN 17871/java 
tcp6 0 0 :::8161 :::* LISTEN 17871/java 
tcp6 0 0 :::36801 :::* LISTEN 17871/java 
tcp6 0 0 :::5672 :::* LISTEN 17871/java 

Access ActiveMQ Web Interface

By default, ActiveMQ listening on port 8161. Open your web browser and type the URL http://your-server-ip:8161, you will be redirected to the following page:

Access ActiveMQ Web Interface

Next, click on Manage ActiveMQ broker, you should see the following page:

Manage ActiveMQ broker

Here, enter the username as admin and password as admin, then click on OK button, you should see the following page.

ActiveMQ Dashboard

Share this page:

نوشته های مشابه