For those who don’t know, Apache ActiveMQ is a free, multi-protocol, Java-based message broker software written in Java. It supports industry-standard protocols that allow communication between separate applications. ActiveMQ is available in the classic and the “next generation” Artemis broker. Once Artemis reaches a sufficient level of feature parity with the 5. x codebase it will become ActiveMQ 6. If you’re looking for a free, high-performance message broker for your applications, you may want to try Apache ActiveMQ. For more about Apache ActiveMQ, please visit its homepage. When you’re ready to install Apache ActiveMQ, follow the steps below:

Install Java

Apache ActiveMQ is written in Java so you’ll need Java installed to run it. The open-source Java works great with ActiveMQ. To install the open-source version of Java, run the commands below: After installing Java, the commands below can be used to verify whether Java is installed. You should see similar output as below:

Install Apache ActiveMQ

Now that Java is installed, run the commands below to download ActiveMQ from the Apache office package repository. At the time of this writing, the current version was 5.15.8. After that, extract the downloaded folder and move its content to the /opt directory and create a folder called activemq To run ActiveMQ effectively, you’ll want to create dedicated user and group accounts. Simply run the commands below to create a username activemq as well as a group name. Next, change the ownership of the /opt/activemq directory so the user can have full control of the content there. After that, you will also want to create an ActiveMQ systemd service so you can control starting, stopping, and enabling its service. To do that, simply run the commands below to create a service file. Then copy the content below into the file and save it. After saving it, run the commands below to enable the service. To verify if the service is functioning, run the commands below to check it. You should see similar output as below: After installing ActiveMQ, its default configuration file is located at /opt/activemq/conf/activemq.xml. You can open it and modify it to fit your environment. After making changes to the file, restart the ActiveMQ service by running the commands below: Finally, open your browser and browse to the server hostname or IP address followed by port #8161 You should be prompted for a username and password. The default is admin/admin Username: admin Password: admin Log in and begin setting up your That should do it! You can also use Apache ActiveMQ with Hawtio using the post below: Conclusion: This post shows you how to install Apache ActiveMQ on Ubuntu 18.04 | 16.04. If you find any errors above, please use the comment form below to report them. You may also like the post below: