Active MQ
Ref
Prerequisite
- Java must be installed
Download
- create a new system user 'activemq'
sudo adduser --system --no-create-home --disabled-login --group activemq
- download compressed file & extract
wget https://archive.apache.org/dist/activemq/5.15.12/apache-activemq-5.15.12-bin.tar.gz
tar -xf apache-activemq-5.15.12-bin.tar.gz
- move the Apache ActiveMQ directory to '/opt/activemq' and change the ownership
mv apache-activemq-*/ /opt/activemq
sudo chown -R activemq:activemq /opt/activemq
- Setup Apache ActiveMQ as a Systemd Service
cd /etc/systemd/system/
sudo vi activemq.service
Paste the following configuration into it.
[Unit]
Description=Apache ActiveMQ
After=network.target
[Service]
Type=forking
WorkingDirectory=/opt/activemq/bin
ExecStart=/opt/activemq/bin/activemq start
ExecStop=/opt/activemq/bin/activemq stop
Restart=on-abort
User=activemq
Group=activemq
[Install]
WantedBy=multi-user.target
- reload the systemd manager to apply the new systemd service configuration
sudo systemctl daemon-reload
- Now start the ActiveMQ server and add it to the system boot.
sudo systemctl start activemq
sudo systemctl enable activemq
- Check status
systemctl status activemq
Configuration file
- /opt/activemq/conf/activemq.xml
Test
- Browser link, http://IPAddr:8161/index.html
- http://IPAddr:8161/admin