How to install ActiveMQ on CentOS

In today’s article, we’ll explain how to install Apache ActiveMQ on a CentOS 5.X VPS. Apache ActiveMQ is is the most popular and powerful open source messaging and Integration Patterns server.

 

 

 

Installing Java JDK

First we’ll need to install Java 1.7 JDK. Oracle has recently disallowed direct downloads of java from their servers, luckily we can still use wget to download Java 1.7 JDK. If you have one of our Java Hosting packages this will already be installed and configured.

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS
cd /tmp/
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" \
"http://download.oracle.com/otn-pub/java/jdk/7u4-b20/jdk-7u4-linux-i586.rpm"
rpm -Uhv jdk-7u4-linux-i586.rpm

To test if the installation is successful, type

java -version

You should see something like this

java version "1.7.0_04"
 Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
 Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode, sharing)

Installing Apache ActiveMQ

This is just as easy as installing Java.

cd /home/yourname
 wget http://www.apache.org/dyn/closer.cgi?path=%2Factivemq%2Fapache-activemq%2F5.6.0%2Fapache-activemq-5.6.0-bin.tar.gz
 tar zxvf apache-activemq-5.6.0-bin.tar.gz
 cd apache-activemq-5.6.0/bin
 ./activemq console &

To test if the installation is successful, type

netstat -an|grep 61616

You should see something like this

tcp 0 0 0.0.0.0:61616 0.0.0.0:* LISTEN

Any questions, feel free to ask. We’ll help you out.

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.

2 thoughts on “How to install ActiveMQ on CentOS”

  1. Hi.
    Useful information.
    When I ran the [root@learn bin]# ./activemq console & command,
    I got the following errors.
    INFO: Invoke the following command to create a configuration file
    ./activemq setup [ /etc/default/activemq | /root/.activemqrc ]

    INFO: Using java ‘/usr/bin/java’
    INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)

    Can you share the configuration details for activemq in CentOS

    Reply
    • You can create a default configuration file using the following command:

      /etc/init.d/activemq setup /etc/default/activemq

      Then, edit the newly generated ‘/etc/default/activemq’ file according to your needs.

      Reply

Leave a Comment