ActiveMQ: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 65: Line 65:
| valign="top" |
| valign="top" |
* [https://medium.com/@hasnat.saeed/setup-activemq-artemis-on-ubuntu-18-04-76bb4975308b ActiveMQ » Artemis » Setup on Ubuntu 18.04]
* [https://medium.com/@hasnat.saeed/setup-activemq-artemis-on-ubuntu-18-04-76bb4975308b ActiveMQ » Artemis » Setup on Ubuntu 18.04]
* [https://www.vultr.com/docs/install-apache-activemq-on-ubuntu-20-04/ ActiveMQ » Classic » Setup on Ubuntu 20.04]
* [https://tecadmin.net/how-to-install-apache-activemq-on-ubuntu-22-04/ ActiveMQ » Classic » Setup on Ubuntu 22.04]
* [https://tecadmin.net/how-to-install-apache-activemq-on-ubuntu-22-04/ ActiveMQ » Classic » Setup on Ubuntu 22.04]
* [https://activemq.apache.org/getting-started ActiveMQ » Classic » Getting Started]
* [https://activemq.apache.org/getting-started ActiveMQ » Classic » Getting Started]

Revision as of 01:04, 24 July 2022

Install Classic

sudo wget -c https://dlcdn.apache.org\
/activemq/5.17.1/apache-activemq-5.17.1-bin.tar.gz        -P /opt/cli/
sudo tar -xvzf /opt/cli/apache-activemq-5.17.1-bin.tar.gz -C /opt/cli/
sudo rm  -rf   /opt/cli/apache-activemq-5.17.1-bin.tar.gz

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
vim /opt/cli/apache-activemq-5.17.1/conf/jetty.xml
#:%s/127.0.0.1/0.0.0.0/gc
sudo groupadd activemq
sudo useradd -s /bin/false -g activemq -d /opt/cli/apache-activemq-5.17.1 activemq

sudo tee -a /etc/systemd/system/activemq.service >/dev/null <<'EOF'
[Unit]
Description=Apache ActiveMQ Message Broker
After=network-online.target

[Service]
Environment="JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64"
Environment="ACTIVEMQ_HOME=/opt/cli/apache-activemq-5.17.1"

Type=forking

User=activemq
Group=activemq

WorkingDirectory=/opt/cli/apache-activemq-5.17.1/bin
ExecStart=/opt/cli/apache-activemq-5.17.1/bin/activemq start
ExecStop=/opt/cli/apache-activemq-5.17.1/bin/activemq stop
Restart=on-abort

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable activemq.service
sudo systemctl status activemq.service
sudo systemctl start activemq.service

Install Artemis

sudo wget -c https://dlcdn.apache.org/activemq\
/activemq-artemis/2.23.1/apache-artemis-2.23.1-bin.tar.gz -P /opt/cli/
sudo tar -xvzf  /opt/cli/apache-artemis-2.23.1-bin.tar.gz -C /opt/cli/
sudo rm  -rf    /opt/cli/apache-artemis-2.23.1-bin.tar.gz

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

Knowledge

sudo ufw allow 8161/tcp
netstat -an|find "61616"
netstat -nl|grep 61616

References