Installing ActiveMQ on OpenSUSE Latest
ActiveMQ is an open-source message broker that facilitates messaging between different applications, services, and systems. In this tutorial, we will guide you through the process of installing ActiveMQ on OpenSUSE Latest.
Prerequisites
Before starting the installation, ensure that you have the following prerequisites:
- A server running OpenSUSE Latest
- Root access to the server
- Basic knowledge of the Linux command-line interface
Step 1: Update the System
Before installing any new software, it is recommended to update the system packages to the latest version.
sudo zypper update
Step 2: Install Java
ActiveMQ runs on the Java Virtual Machine (JVM), so you need to have Java installed on your system.
Open the terminal and type the following command to install the default JDK:
sudo zypper install java-11-openjdk
Step 3: Download ActiveMQ
Download the latest version of ActiveMQ from the Apache ActiveMQ download page.
wget https://downloads.apache.org/activemq/latest/apache-activemq-x.x.x-bin.tar.gz
Replace the "x.x.x" with the latest version number.
Extract the downloaded file to the /opt directory.
sudo tar -zxvf apache-activemq-x.x.x-bin.tar.gz -C /opt/
Step 4: Configure ActiveMQ
Create a symbolic link to the ActiveMQ installation directory named “activemq” for easy reference.
sudo ln -s /opt/apache-activemq-x.x.x /opt/activemq
Configuring ActiveMQ to run as a service in the background.
Create a new file named activemq.service in the /etc/systemd/system/ directory.
sudo nano /etc/systemd/system/activemq.service
Copy and paste the following content into the file:
[Unit]
Description=ActiveMQ message broker
After=network.target
[Service]
Type=forking
ExecStart=/opt/activemq/bin/activemq start
ExecStop=/opt/activemq/bin/activemq stop
User=root
Group=root
[Install]
WantedBy=multi-user.target
Save the file by pressing "Ctrl-X," typing "Y" and then "Enter."
Configure the service to start automatically at system boot.
sudo systemctl daemon-reload
sudo systemctl enable activemq
Step 5: Start ActiveMQ
Start the ActiveMQ service.
sudo systemctl start activemq
Check the status of the service to ensure that it is running.
sudo systemctl status activemq
Step 6: Access ActiveMQ Web Console
ActiveMQ comes with a web console that you can use to monitor and manage the message broker.
In your web browser, go to the following URL:
http://your_server_ip:8161/admin/
Replace "your_server_ip" with the IP address of your server.
Enter the username and password as "admin" to log in to the web console.
Congratulations! You have successfully installed and configured ActiveMQ on OpenSUSE.