Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to install ActiveMQ on Ubuntu 16.04

ActiveMQ is an open-source, message broker software, which can serve as a central point for communication between distributed processes. In other words, it’s used to reliably communicate between two distributed processes or applications/services that need to communicate with each other, but their languages are incompatible between each other. Since its creation, ActiveMQ has turned into a strong alternative to the commercial alternatives like EMS/TIBCO or WebSphereMQ and it is actively used in production by some of the top companies ranging from financial services to retail.

There is very little information on how ActiveMQ is installed. In reality, the installation is pretty straight forward, but and the official documentation is very vague and this leads to frustration in an inexperienced person. In this blog post, we will explain how ActiveMQ can be installed on a Ubuntu 16 VPS.

First things update/upgrade your Virtual Server with the latest software:

# apt-get update && apt-get upgrade

Install the default Java JDK

# apt-get install default-jdk

Check if the java has correctly been installed:

# java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

We are now ready to install ActiveMQ. We will be installing into the /opt directory by downloading the tar archive from their official site. At the moment of installing 5.14.3 is the current version:

# cd /opt
# wget http://www.trieuvan.com/apache/activemq/5.14.3/apache-activemq-5.14.3-bin.tar.gz

### Unpack the archive and create a simlink to the current installation for easier access later.
# tar zxf apache-activemq-5.14.3-bin.tar.gz
# ln -s /opt/apache-activemq-5.14.3 activemq
# rm apache-activemq-5.14.3-bin.tar.gz

At this moment the installation is complete. ActiveMQ configuration files are located in its default directory in the conf folder. In our case, they are located into /opt/activemq/conf/. The default configuration files work well for testing the application. The file of our interest is the /opt/activemq/conf/activemq.xml file because in here are defined the transport connectors i.e. the protocols which we like to be enabled or disabled for our ActiveMQ implementation.

Feel free to check the  section and comment out any unwanted protocols. For testing purposes, you can leave the default as it is.

Start the ActiveMQ server whenever you feel ready:

# /opt/activemq/bin/activemq start

Check that everything is good using the netstat command:

# netstat -tulnp | grep java
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 25074/java
tcp 0 0 0.0.0.0:8161 0.0.0.0:* LISTEN 25074/java
tcp 0 0 0.0.0.0:5672 0.0.0.0:* LISTEN 25074/java
tcp 0 0 0.0.0.0:42699 0.0.0.0:* LISTEN 25074/java
tcp 0 0 0.0.0.0:61613 0.0.0.0:* LISTEN 25074/java
tcp 0 0 0.0.0.0:61614 0.0.0.0:* LISTEN 25074/java
tcp 0 0 0.0.0.0:61616 0.0.0.0:* LISTEN 25074/java

ActiveMQ’s web administration interface listens on port :8161. It can be accessed using the bellow URL for the front-end and the back-end respectively where WW.XX.YY.ZZ is your VPS IP Address. The default username and password are both admin

http://WW.XX.YY.ZZ:8161
http://WW.XX.YY.ZZ:8161/admin

And that’s it, you now have functioning ActiveMQ service


PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.



This post first appeared on Virtual-Server.org Virtual Server, please read the originial post: here

Share the post

How to install ActiveMQ on Ubuntu 16.04

×

Subscribe to Virtual-server.org Virtual Server

Get updates delivered right to your inbox!

Thank you for your subscription

×