Apache ActiveMQ installation in linux server2 min read

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

Apache ActiveMQ is an open source message broker written in Java together with a full Java Message Service client. It provides “Enterprise Features” which in this case means fostering the communication from more than one client or server.

First make your system up to date.

apt-get update && apt-get upgrade

Install Java JDK 8

You can find the installation link here for Java8


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


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 <transportConnectors> section and comment out any unwanted protocols. For testing purposes, you can leave the default as it is.

<!– DOS protection, limit concurrent connections to 1000 and frame size to 100MB –>
<transportConnector name=”openwire” uri=”tcp://;wireFormat.maxFrameSize=104857600″/>
<transportConnector name=”amqp” uri=”amqp://;wireFormat.maxFrameSize=104857600″/>
<transportConnector name=”stomp” uri=”stomp://;wireFormat.maxFrameSize=104857600″/>
<transportConnector name=”mqtt” uri=”mqtt://;wireFormat.maxFrameSize=104857600″/>
<transportConnector name=”ws” uri=”ws://;wireFormat.maxFrameSize=104857600″/>

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* LISTEN 25074/java
tcp 0 0* LISTEN 25074/java
tcp 0 0* LISTEN 25074/java
tcp 0 0* LISTEN 25074/java
tcp 0 0* LISTEN 25074/java
tcp 0 0* LISTEN 25074/java
tcp 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


Now you have finished the installation.

© 2018, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

Related posts

Leave a Reply