Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Tutorials»How to Install Apache ActiveMQ on Ubuntu 22.04

    How to Install Apache ActiveMQ on Ubuntu 22.04

    RahulBy RahulApril 28, 20223 Mins Read

    Apache ActiveMQ is an opensource message-oriented middleware (MOM) broker service written in Java programming language. It is a protocol developed by the Apache foundation that helps to send messages between different applications with additional features.

    This tutorial helps you to install Apache ActiveMQ on Ubuntu 22.04 LTS Linux system.

    Prepare Your System

    The ActiveMQ can be configured on any system that has Java installed. So make sure that your Ubuntu 22.04 Linux system has Java installed.

    You can install Java on your with the following commands.

    sudo apt update 
    sudo apt install default-jdk 
    

    It’s a good practice and recommended for running applications as non-root users. To create a user on your system, type:

    sudo adduser activemq
    

    Set the password to complete the user creation.

    Now, the Ubuntu 22.04 is ready for Apache ActiveMQ installation. Go through the below steps:

    Install Apache ActiveMQ on Ubuntu 22.04

    First of all, download the latest version of Apache ActiveMQ source code from its official download page.

    As of today, ActiveMQ 5.17.0 is the latest available version, that can be downloaded with the following commands.

    wget https://dlcdn.apache.org//activemq/5.17.0/apache-activemq-5.17.0-bin.tar.gz
    tar xzf apache-activemq-5.17.0-bin.zip -C /opt 
    

    Second command will extract the file at /opt/apache-activemq-5.17.0 directory.

    The default ActiveMQ allows on localhost only. To enable ActiveMQ access for a local or public network, edit conf/jetty.xml configuration file.

    sudo nano /opt/apache-activemq-5.17.0/conf/jetty.xml
    

    Search for the below configuration section.

    XHTML
    1
    2
    3
    4
    5
        <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
                 <!-- the default port number for the web console -->
            <property name="host" value="localhost"/>
            <property name="port" value="8161"/>
        </bean>

    Change host value from localhost to system IP address or set 0.0.0.0 to listen on all interfaces.

    Save the file and close it.

    Running ActiveMQ As Systemd Service

    Systemd is the default system and service manager for the latest Linux operating systems. To make the service startup easier, create a configuration file for ActiveMQ as below:

    sudo nano /etc/systemd/system/activemq.service

    Add the following content:

    /etc/systemd/system/activemq.service
    [Unit] Description=Apache ActiveMQ Message Broker After=network-online.target [Service] Type=forking User=activemq Group=activemq WorkingDirectory=/opt/apache-activemq-5.17.0/bin ExecStart=/opt/apache-activemq-5.17.0/bin/activemq start ExecStop=/opt/apache-activemq-5.17.0/bin/activemq stop Restart=on-abort [Install] WantedBy=multi-user.target

    In case of a different version or location of ActiveMQ, update the configuration as per your system.

    Save the file and close it.

    Now reload the systemctl daemon to read the new configuration file.

    sudo systemctl daemon-reload

    After that, enable the ActiveMQ systemd service to auto-start on system boot. Also, start the service.

    sudo systemctl enable activemq.service
    sudo systemctl start activemq.service

    Once the service is started, make sure that ActiveMQ service is up and running:

    sudo systemctl status activemq.service
    How to Install ActiveMQ on Ubuntu 22.04
    Apache ActiveMQ Borker Running Service

    That’s it. The Apache ActiveMQ service is up and running on Ubuntu 22.04 LTS system.

    Test Installation

    As the ActiveMQ installation is completed on the Ubuntu system. Let’s test if the installation is succeeded successfully.

    If the UFQ firewall is active and you are accessing the Apache ActiveMQ from a remote host, make sure to open the 8161 port. You can open the UFW port with the following command.

    sudo ufw allow 8161/tcp

    Now, open a browser and access

  • http://server-ip:8161/
  • How to Install Apache ActiveMQ on Ubuntu 22.04
    Apache ActiveMQ Homepage

    You can access the ActiveMQ admin section with the following URL:

    • http://server-ip:8161/admin
    • Username: admin
    • Password: admin
    How to Install ActiveMQ on Ubuntu 22.04
    Apache ActiveMQ Broker Admin Interface

    Conclusion

    In this tutorial, you have learned to install the Apache ActiveMQ on the Ubuntu system. In addition, provides you the configuration to access ActiveMQ on a private or public network.

    ActiveMQ Apache
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleDownload Ubuntu 22.04 – DVD ISO Images
    Next Article How to Configure Static IP Address on Ubuntu 22.04

    Related Posts

    (Resolved) userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms

    Updated:May 10, 20221 Min Read

    How To Enable SSH Server on Ubuntu 22.04

    Updated:April 22, 20222 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    How To Disable HTTP Methods in Apache

    Updated:December 31, 20212 Mins Read

    10 Best Linux Video Players in 2022

    Updated:February 18, 20226 Mins Read

    How To Setup Apache, PHP & MongoDB in Ubuntu & Debian

    Updated:October 8, 20213 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.