<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Activemq Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/activemq/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 30 Jul 2020 16:45:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>
	<item>
		<title>Install Apache ActiveMQ on Ubuntu 20.04 / 18.04</title>
		<link>https://www.osradar.com/install-apachemq-ubuntu-20-04-18-04/</link>
					<comments>https://www.osradar.com/install-apachemq-ubuntu-20-04-18-04/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 31 Jul 2020 01:00:00 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Activemq]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tuorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=10374</guid>

					<description><![CDATA[<p>On an enterprise server, many important applications are likely to cohabit. The need for a broker makes more sense if these applications are constantly transferring information. In addition, an organization&#8217;s scalable infrastructure depends on the quality of the applications. Therefore, in this post, I will show you how to install Apache ActiveMQ on Ubuntu 20.04 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apachemq-ubuntu-20-04-18-04/">Install Apache ActiveMQ on Ubuntu 20.04 / 18.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>On an enterprise server, many important applications are likely to cohabit. The need for a broker makes more sense if these applications are constantly transferring information. In addition, an organization&#8217;s scalable infrastructure depends on the quality of the applications. Therefore, in this post, I will show you how to install Apache ActiveMQ on <a href="http://osradara.com/tag/ubuntu" rel="noopener">Ubuntu</a> 20.04 / 18.04.</p>
<p>In computing, the term broker defines an intermediary between two or more applications that need resources and information between them. So, Apache <a href="http://activemq.apache.org/" rel="noopener">ActiveMQ</a> is the most popular and powerful open source messaging and Integration Patterns server. It is open source licensed under the Apache 2.0 License.</p>
<p>Besides being able to be used in <a href="https://www.osradar.com/how-to-install-oracle-java-on-ubuntu-18-10/" rel="noopener">Java</a>, ActiveMQ can also be used in .NET, <a href="https://www.osradar.com/install-codeblocks-on-linux/" rel="noopener">C/C++</a> or Delphi or from script languages such as Perl, <a href="https://www.osradar.com/get-the-latest-python-on-linux/" rel="noopener">Python</a>, PHP, and <a href="https://www.osradar.com/how-to-install-ruby-on-rails-on-ubuntu-18-04/" rel="noopener">Ruby</a> through various &#8220;cross-language clients&#8221;.</p>
<p>So, let us start.</p>
<h2>1. Install Java</h2>
<p>If you use Ubuntu 20.04 / 18.04 it is unlikely that you do not have Java installed, however, you can do it in an easy way with the following command:</p>
<pre class="">:~$ sudo apt install openjdk-11-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  at-spi2-core ca-certificates-java fontconfig-config fonts-dejavu-core fonts-dejavu-extra java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni
  libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1
  libfontconfig1 libfontenc1 libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm10 libnspr4
  libnss3 libpciaccess0 libpcsclite1 libsensors-config libsensors5 libsm6 libvulkan1 libwayland-client0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0
  libxcb-present0 libxcb-randr0 libxcb-shape0 libxcb-sync1 libxcomposite1 libxdamage1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxpm4 libxrandr2
  libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 mesa-vulkan-drivers openjdk-11-jre-headless x11-common x11-utils
Suggested packages:
  default-jre cups-common liblcms2-utils pcscd lm-sensors libnss-mdns fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
  mesa-utils
The following NEW packages will be installed:
  at-spi2-core ca-certificates-java fontconfig-config fonts-dejavu-core fonts-dejavu-extra java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni
  libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1
  libfontconfig1 libfontenc1 libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm10 libnspr4
  libnss3 libpciaccess0 libpcsclite1 libsensors-config libsensors5 libsm6 libvulkan1 libwayland-client0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0
  libxcb-present0 libxcb-randr0 libxcb-shape0 libxcb-sync1 libxcomposite1 libxdamage1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxpm4 libxrandr2
  libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 mesa-vulkan-drivers openjdk-11-jre openjdk-11-jre-headless x11-common x11-utils
0 upgraded, 74 newly installed, 0 to remove and 83 not upgraded.
Need to get 72.6 MB of archives.</pre>
<figure id="attachment_22122" aria-describedby="caption-attachment-22122" style="width: 1361px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-22122 size-full" src="https://www.osradar.com/wp-content/uploads/2019/01/1-27.png" alt="1.- Installing Java on Ubuntu 20.04" width="1361" height="408" srcset="https://www.osradar.com/wp-content/uploads/2019/01/1-27.png 1361w, https://www.osradar.com/wp-content/uploads/2019/01/1-27-300x90.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/1-27-1024x307.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/1-27-768x230.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/1-27-696x209.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/1-27-1068x320.png 1068w" sizes="(max-width: 1361px) 100vw, 1361px" /><figcaption id="caption-attachment-22122" class="wp-caption-text">1.- Installing Java on Ubuntu 20.04 / 18.04</figcaption></figure>
<p>Next, check the java version to ensure that everything is Ok.</p>
<pre class="">:~$ java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)</pre>
<p>This first step is vital because Apache ActiveMQ requires Java to work. That&#8217;s why we had to install it.</p>
<h2>2. Install Apache ActiveMQ</h2>
<p>Now we can continue with the installation. The best way to install Apache ActiveMQ is through your binaries that we can get from your website. With this, you guarantee that you will have the latest stable version available.</p>
<p>First, download the file.</p>
<pre class="">:~$ cd /opt/
:~$ sudo wget -c http://mirrors.advancedhosters.com/apache/activemq/5.16.0/apache-activemq-5.16.0-bin.tar.gz</pre>
<figure id="attachment_22124" aria-describedby="caption-attachment-22124" style="width: 1352px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-22124 size-full" src="https://www.osradar.com/wp-content/uploads/2019/01/2-25.png" alt="2.- Download Apache ActiveMQ" width="1352" height="245" srcset="https://www.osradar.com/wp-content/uploads/2019/01/2-25.png 1352w, https://www.osradar.com/wp-content/uploads/2019/01/2-25-300x54.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/2-25-1024x186.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/2-25-768x139.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/2-25-696x126.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/2-25-1068x194.png 1068w" sizes="(max-width: 1352px) 100vw, 1352px" /><figcaption id="caption-attachment-22124" class="wp-caption-text">2.- Download Apache ActiveMQ</figcaption></figure>
<p>Decompress it.</p>
<pre class="">:~$ sudo tar xzvf apache-activemq-5.16.0-bin.tar.gz</pre>
<p>Then, create a symbolic link to make easier the access.</p>
<pre class="">:~$ sudo ln -s apache-activemq-5.16.0 activemq
</pre>
<p>Then, create a new user for ActiveMQ. Assign permissions to the folder and then log in as that new user.</p>
<pre>$ sudo useradd activemq
$ sudo chown -RH activemq: /opt/activemq</pre>
<h2>3. Configure Apache ActiveMQ</h2>
<p>First of all, it is necessary to create a systemd service in order to access the program even more easily. To do this, run:</p>
<pre class="">:~$ sudo nano /etc/systemd/system/activemq.service</pre>
<p>And add the following:</p>
<pre class="">[Unit]
Description=Apache ActiveMQ
After=network.target

[Service]
Type=forking

User=activemq
Group=activemq

ExecStart=/opt/activemq/bin/activemq start
ExecStop=/opt/activemq/bin/activemq stop

[Install]
WantedBy=multi-user.target
</pre>
<figure id="attachment_22125" aria-describedby="caption-attachment-22125" style="width: 966px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-22125 size-full" src="https://www.osradar.com/wp-content/uploads/2019/01/3-25.png" alt="3.- Creating a systemd service" width="966" height="320" srcset="https://www.osradar.com/wp-content/uploads/2019/01/3-25.png 966w, https://www.osradar.com/wp-content/uploads/2019/01/3-25-300x99.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/3-25-768x254.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/3-25-696x231.png 696w" sizes="(max-width: 966px) 100vw, 966px" /><figcaption id="caption-attachment-22125" class="wp-caption-text">3.- Creating a systemd service</figcaption></figure>
<p>Now, reload the systemd cache.</p>
<pre class="">:~$ sudo systemctl daemon-reload</pre>
<p><strong><em>NOTE: It is not mandatory to create the file to transform ActiveMQ into a </em>systemd<em> service and in some </em>cases<em>, it can cause problems.</em></strong></p>
<p>You can also start ActiveMQ with this command:</p>
<pre class="">:~$ /opt/activemq/bin/activemq start</pre>
<p>Also, you can use the newly created service:</p>
<pre>:~$ sudo systemctl start activemq</pre>
<p>Or stop it with this command:</p>
<pre class="">:~$ /opt/activemq/bin/activemq stop</pre>
<figure id="attachment_10404" aria-describedby="caption-attachment-10404" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10404" src="https://www.osradar.com/wp-content/uploads/2019/01/6-19.png" alt="6.- Start and stop the ActiveMQ program" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/01/6-19.png 1366w, https://www.osradar.com/wp-content/uploads/2019/01/6-19-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/6-19-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/6-19-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/6-19-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/6-19-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/6-19-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10404" class="wp-caption-text">4.- Start and stop the ActiveMQ program</figcaption></figure>
<p>Next, let us configure it.</p>
<p>Open the activem.xml file. This file contains all ActiveMQ settings.</p>
<pre class="">:~$ sudo nano /opt/activemq/conf/activemq.xml</pre>
<figure id="attachment_10405" aria-describedby="caption-attachment-10405" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10405" src="https://www.osradar.com/wp-content/uploads/2019/01/7-19.png" alt="7.- The config file" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/01/7-19.png 1366w, https://www.osradar.com/wp-content/uploads/2019/01/7-19-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/7-19-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/7-19-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/7-19-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/7-19-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/7-19-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10405" class="wp-caption-text">5.- The config file</figcaption></figure>
<h3>Creating a transport connector</h3>
<p>The first step is to configure the transport connector. Edit the file in question and place it in the transport connector section.</p>
<p>It&#8217;s a pretty large file, but with the help of nano, we can quickly find the sections. Press CTRL + W and type &#8220;transport&#8221;.</p>
<figure id="attachment_10406" aria-describedby="caption-attachment-10406" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10406" src="https://www.osradar.com/wp-content/uploads/2019/01/8-16.png" alt="8.-Config file" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/01/8-16.png 1366w, https://www.osradar.com/wp-content/uploads/2019/01/8-16-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/8-16-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/8-16-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/8-16-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/8-16-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/8-16-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10406" class="wp-caption-text">6.-Config file</figcaption></figure>
<p>The syntax is very simple:</p>
<ul>
<li>broker_name: is the brokerName attribute of the tag broker of activemq.xml</li>
<li>transportOptions: different communication options.</li>
</ul>
<p>Now, the parameters URI is the in the connection type function. For example, you can specify a broker using TCP or VM.</p>
<p>Let us see an example:</p>
<pre class="">&lt;transportConnection name="openwire" uri="tcp://192.168.3.4:8765?trace=false&amp;soTimeout=60000"&gt;</pre>
<p>On the URI option, you have to add the protocol, the port, and the options.</p>
<figure id="attachment_10408" aria-describedby="caption-attachment-10408" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10408" src="https://www.osradar.com/wp-content/uploads/2019/01/9-11.png" alt="9.- Creating a transport connector" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/01/9-11.png 1366w, https://www.osradar.com/wp-content/uploads/2019/01/9-11-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/9-11-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/9-11-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/9-11-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/9-11-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/9-11-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10408" class="wp-caption-text">7.- Creating a transport connector</figcaption></figure>
<h3>System usage</h3>
<p>It is also possible to limit the use of system resources. In the same file in the system usage section, you can configure it.</p>
<figure id="attachment_10409" aria-describedby="caption-attachment-10409" style="width: 798px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10409" src="https://www.osradar.com/wp-content/uploads/2019/01/10-9.png" alt="10.- System usage" width="798" height="302" srcset="https://www.osradar.com/wp-content/uploads/2019/01/10-9.png 798w, https://www.osradar.com/wp-content/uploads/2019/01/10-9-300x114.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/10-9-768x291.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/10-9-696x263.png 696w" sizes="(max-width: 798px) 100vw, 798px" /><figcaption id="caption-attachment-10409" class="wp-caption-text">8.- System usage</figcaption></figure>
<p>There you can limit, for example, the use of the hard disk and the RAM memory.</p>
<h3>Finals settings</h3>
<p>These are basic ActiveMQ configurations. One thing you can do is prevent the storage buffer from ending up with all the RAM. For that, in the same configuration file go to the policy entry section.</p>
<p>You can limit all the messages to a specific size.</p>
<figure id="attachment_10411" aria-describedby="caption-attachment-10411" style="width: 693px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10411" src="https://www.osradar.com/wp-content/uploads/2019/01/11-7.png" alt="11.- Limit the messages" width="693" height="319" srcset="https://www.osradar.com/wp-content/uploads/2019/01/11-7.png 693w, https://www.osradar.com/wp-content/uploads/2019/01/11-7-300x138.png 300w" sizes="(max-width: 693px) 100vw, 693px" /><figcaption id="caption-attachment-10411" class="wp-caption-text">9.- Limit the messages</figcaption></figure>
<p>Another thing ActiveMQ has a built-in database manager called KahaDB that is mainly in charge of storing messages. You can replace it with <a href="https://www.osradar.com/making-a-mysql-database-backup-with-mysqldump/" rel="noopener">MySQL</a> or <a href="https://www.osradar.com/optimize-mysql-mariadb-on-linux/" rel="noopener">MariaDB</a> but KahaDB is very superior in performance, so it is not recommended to do this.</p>
<p>Finally, start ActiveMQ. Then, open your web browser and go to http://SERVER_IP:8161.</p>
<pre class="">:~$ /opt/activemq/bin/activemq start</pre>
<figure id="attachment_10415" aria-describedby="caption-attachment-10415" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10415" src="https://www.osradar.com/wp-content/uploads/2019/01/12-7.png" alt="12.- ActiveMQ web interface" width="1366" height="666" srcset="https://www.osradar.com/wp-content/uploads/2019/01/12-7.png 1366w, https://www.osradar.com/wp-content/uploads/2019/01/12-7-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/12-7-768x374.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/12-7-1024x499.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/12-7-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/01/12-7-696x339.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/12-7-1068x521.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/12-7-861x420.png 861w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10415" class="wp-caption-text">10.- ActiveMQ web interface</figcaption></figure>
<h2>Conclusion</h2>
<p>It is clear that ActiveMQ is an enterprise infrastructure software. Known and very popular for being efficient and a benchmark in its area.</p>
<p>Please share this post with your friends. Join <a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer">our Telegram Channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apachemq-ubuntu-20-04-18-04/">Install Apache ActiveMQ on Ubuntu 20.04 / 18.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-apachemq-ubuntu-20-04-18-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
