-
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 18.04 has
5.15.8 - Ubuntu 20.04 has
5.15.11 - Ubuntu 22.04 has
5.16.1 - Ubuntu 22.10 has
5.16.1
-
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(v5.18.2) was verified at the time of creation of these instructions
-
RHEL (7.8, 7.9, 8.4, 8.6, 8.7, 9.0, 9.1)
-
With OpenJDK 11
sudo yum install -y git java-11-openjdk
-
With OpenJDK 17 (Not for RHEL 7.x)
sudo yum install -y git java-17-openjdk-devel
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
sudo yum install -y net-tools wget tar
Download and install IBM Semeru Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly. -
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
sudo yum install -y net-tools wget tar
Download and install Eclipse Adoptium Temurin Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly.
-
-
SLES 12 SP5
-
With OpenJDK 11:
sudo zypper install -y java-11-openjdk-devel net-tools wget tar gzip
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
sudo zypper install -y net-tools wget tar gzip
Download and install IBM Semeru Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly. -
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
sudo zypper install -y net-tools wget tar gzip
Download and install Eclipse Adoptium Temurin Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly.
-
-
SLES 15 SP4
-
With OpenJDK 11:
sudo zypper install -y java-11-openjdk-devel net-tools-deprecated wget tar gzip
-
With OpenJDK 17
sudo zypper install -y --auto-agree-with-licenses java-17-openjdk java-17-openjdk-devel net-tools-deprecated wget tar gzip
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
sudo zypper install -y net-tools-deprecated wget tar gzip
Download and install IBM Semeru Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly. -
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
sudo zypper install -y net-tools wget tar gzip
Download and install Eclipse Adoptium Temurin Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly.
-
-
Ubuntu (18.04, 20.04, 22.04, 22.10)
-
With OpenJDK 11
sudo apt-get update sudo apt-get install -y openjdk-11-jdk net-tools wget tar
-
With OpenJDK 17
sudo apt-get install -y openjdk-17-jdk net-tools wget tar
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
sudo apt-get update sudo apt-get install -y net-tools wget tar
Download and install IBM Semeru Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly. -
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
sudo apt-get update sudo apt-get install -y net-tools wget tar
Download and install Eclipse Adoptium Temurin Runtime (Java 11 or Java 17) from here, unzip binary and update
JAVA_HOMEandPATHaccordingly. -
Note: At the time of creation of these build instructions, Apache ActiveMQ 5.18.2 was verified IBM Semeru Runtime Open Edition and Eclipse Adoptium Temurin Runtime version 11.0.18.0 (build 11.0.18+10) and 17.0.6.0 (build 17.0.6+10).
-
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 5.18.2 (localhost, ID:6d48ba2fefe3-43067-1681105731069-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.