-
Notifications
You must be signed in to change notification settings - Fork 56
Building Apache ActiveMQ
Below versions of Apache ActiveMQ are available in respective distributions at the time of creation of these build instructions:
- Ubuntu 20.04 has
5.15.11
- Ubuntu 22.04 has
5.16.1
- Ubuntu (24.04, 24.10) have
5.17.6
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
Apache ActiveMQ binaries are available and can be downloaded from here. To use these binaries, different Java flavors can be installed on mentioned distributions.
Note: Apache ActiveMQ(v6.1.5) was verified at the time of creation of these instructions
-
RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y wget tar net-tools curl procps
-
SLES 15 SP6
sudo zypper install -y net-tools-deprecated wget tar gzip curl
-
Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get update sudo apt-get -y install curl wget tar net-tools
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9).
- Download and install IBM Semeru Runtime (Java 17 or 21) from here.
-
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
- Download and install Eclipse Adoptium Temurin Runtime (Java 17 or 21) from here.
-
With OpenJDK 17
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-17-openjdk-devel
- SLES 15 SP6
sudo zypper install -y --auto-agree-with-licenses java-17-openjdk java-17-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-17-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
-
With OpenJDK 21
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-21-openjdk-devel
- SLES 15 SP6
sudo zypper install -y --auto-agree-with-licenses java-21-openjdk java-21-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-21-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
Note: Versions (v17.0.12 and v21.0.4) of IBM Semeru Runtime and (v17.0.12 and v21.0.4) of Adoptium Temurin Runtime were used at the time of creation of these instructions.
-
Set JAVA_HOME and PATH
export JAVA_HOME=<Path to Java> export PATH=$JAVA_HOME/bin:$PATH
To start the process, extract binary tarball to /<source_root>/ and follow steps given below
export SOURCE_ROOT=/<source_root>/
export PATH=$JAVA_HOME/bin:$PATH
cd $SOURCE_ROOT/<apache-activemq_binary_folder>/bin
./activemq console # Run ActiveMQ as a foreground process or
./activemq start # Run ActiveMQ as a daemon process
-
Using the administrative interface
Open the administrative interface URL: http://<HOST_NAME>:8161/admin Login: admin Password: admin
- Navigate to "Queues"
- Add a queue name and click create
- Send test message by clicking on "Send to"
Note: If the administrative interface is not accessible when the activemq process is up, you can have the following change and restart the activemq process
sed -i "s/127.0.0.1/0.0.0.0/" $SOURCE_ROOT/<apache-activemq_binary_folder>/conf/jetty.xml cd $SOURCE_ROOT/<apache-activemq_binary_folder>/bin ./activemq stop ./activemq console # Run ActiveMQ as a foreground process or ./activemq start # Run ActiveMQ as a daemon process
-
Logfile and console output
- If ActiveMQ is up and running without problems, the Unix command shell will display information similar to the following log line:
(see stdout output or
$SOURCE_ROOT/apache-activemq_binary_folder/data/activemq.log
)INFO | Apache ActiveMQ 6.1.5 (localhost, ID:643e56380458-37425-1724138637219-0:1) started
- If ActiveMQ is up and running without problems, the Unix command shell will display information similar to the following log line:
(see stdout output or
-
Listen port
- ActiveMQ's default port is 61616. From another window, run netstat command and search for port 61616.
netstat -nl | grep 61616
-
Get more ActiveMQ status
./activemq bstat
-
Stopping ActiveMQ
./activemq stop
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.