How to Install ActiveMQ on Debian Latest

In this tutorial, we will guide you through the process of installing Apache ActiveMQ on Debian Latest.

Step 1: Update the System

The first step is to update the package lists and upgrade any existing packages. You can do this by running the following command in your terminal:

sudo apt update && sudo apt upgrade

Step 2: Install Java

ActiveMQ requires Java to be installed on your system. If you already have Java installed, you can skip this step.

To install Java, run the following command:

sudo apt install default-jre

Step 3: Download ActiveMQ

Download the latest version of ActiveMQ from the official website by running the following command:

wget https://www.apache.org/dyn/closer.cgi?path=/activemq/5.16.3/apache-activemq-5.16.3-bin.tar.gz

This will download the file to your current directory. You can check the latest version on ActiveMQ's website.

Step 4: Extract ActiveMQ

Once the download is complete, extract the file using the following command:

tar -xvf apache-activemq-5.16.3-bin.tar.gz

Step 5: Move ActiveMQ to the Opt Directory

Rename the extracted directory and move the ActiveMQ files to the /opt directory by running:

sudo mv apache-activemq-5.16.3 /opt/

Step 6: Set the Environment Variables

Set the environment variables by running the following commands:

sudo nano /etc/environment

Add the following lines to the end of the file:

ACTIVEMQ_HOME=/opt/apache-activemq-5.16.3
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
CLASSPATH=$JAVA_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$ACTIVEMQ_HOME/bin

Save and close the file by pressing Ctrl+X, Y, then Enter.

Step 7: Start ActiveMQ

You can now start ActiveMQ by running the following command:

sudo /opt/apache-activemq-5.16.3/bin/activemq start

You can test if the installation was successful by accessing the ActiveMQ web interface by visiting http://<server-ip>:8161/admin.

Conclusion

In this tutorial, we covered how to install ActiveMQ on Debian Latest, including installing Java, downloading the ActiveMQ package, extracting the files, moving them to the /opt directory, and setting up the environment variables. You can now use ActiveMQ to create message queues and topics for your applications.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!