<?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"
	>

<channel>
	<title>swig505.com</title>
	<atom:link href="http://swig505.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://swig505.com</link>
	<description>You can't have the frosting without the cake.</description>
	<pubDate>Wed, 30 Jul 2008 03:34:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Installing and Configuring ActiveMQ on Mac OS X</title>
		<link>http://swig505.com/2008/07/29/installing-and-configuring-activemq-on-mac-os-x/</link>
		<comments>http://swig505.com/2008/07/29/installing-and-configuring-activemq-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 03:34:56 +0000</pubDate>
		<dc:creator>bsmith</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[activemq]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[mac os x]]></category>

		<category><![CDATA[messaging]]></category>

		<guid isPermaLink="false">http://swig505.com/?p=8</guid>
		<description><![CDATA[Before we get started, I just want to clarify that this tutorial is for installing ActiveMQ on a development box, not in production! If you are installing ActiveMQ on a production box, please ensure at the very least that you have considered the following: using a proper persistence adapter, using authorization/authentication, and probably turning off [...]<p><a href="http://sharethis.com/item?&#038;wp=2.5.1&#38;publisher=aa6701ec-0045-4487-b5b5-e85a3e035328&#38;title=Installing+and+Configuring+ActiveMQ+on+Mac+OS+X&#38;url=http%3A%2F%2Fswig505.com%2F2008%2F07%2F29%2Finstalling-and-configuring-activemq-on-mac-os-x%2F">ShareThis</a></p>]]></description>
			<content:encoded><![CDATA[<p>Before we get started, I just want to clarify that this tutorial is for installing ActiveMQ on a development box, not in production! If you are installing ActiveMQ on a production box, please ensure at the very least that you have considered the following: using a proper persistence adapter, using authorization/authentication, and probably turning off the jetty admin console. Perhaps I&#8217;ll cover these in a later post.</p>
<h3>Download and Install</h3>
<p>Download and extract the latest version of ActiveMQ (at the time of this writing, it is 5.1.0):</p>
<p><code>wget http://www.eng.lsu.edu/mirrors/apache/activemq/apache-activemq/5.1.0/apache-activemq-5.1.0-bin.tar.gz</code></p>
<p><code>tar -zxvf apache-activemq-5.1.0-bin.tar.gz</code></p>
<p><code>sudo mv apache-activemq-5.1.0 /usr/local/</code></p>
<h3>Configure</h3>
<p><code>cd /usr/local/apache-activemq-5.1.0</code></p>
<p>Replace the configuration in <strong>conf/activemq.xml</strong> with the following:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;beans</span>
  <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans&quot;</span> 
  <span style="color: #000066;">xmlns:amq</span>=<span style="color: #ff0000;">&quot;http://activemq.apache.org/schema/core&quot;</span> 
  <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> 
  <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Allows us to use system properties as variables in this configuration file --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.springframework.beans.factory.config.PropertyPlaceholderConfigurer&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;broker</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://activemq.apache.org/schema/core&quot;</span> <span style="color: #000066;">brokerName</span>=<span style="color: #ff0000;">&quot;localhost&quot;</span> <span style="color: #000066;">dataDirectory</span>=<span style="color: #ff0000;">&quot;${activemq.base}/data&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Use the following to configure how ActiveMQ is exposed in JMX --&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;managementContext<span style="font-weight: bold; color: black;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;managementContext</span> <span style="color: #000066;">createConnector</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/managementContext<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;persistenceAdapter<span style="font-weight: bold; color: black;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;amqPersistenceAdapter</span> <span style="color: #000066;">syncOnWrite</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">directory</span>=<span style="color: #ff0000;">&quot;${activemq.base}/data&quot;</span> <span style="color: #000066;">maxFileLength</span>=<span style="color: #ff0000;">&quot;20 mb&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/persistenceAdapter<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The transport connectors ActiveMQ will listen to --&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;transportConnectors<span style="font-weight: bold; color: black;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;transportConnector</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;openwire&quot;</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;tcp://localhost:61616&quot;</span> <span style="color: #000066;">discoveryUri</span>=<span style="color: #ff0000;">&quot;multicast://default&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;transportConnector</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ssl&quot;</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;ssl://localhost:61617&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;transportConnector</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;stomp&quot;</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;stomp://localhost:61613&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;transportConnector</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;xmpp&quot;</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;xmpp://localhost:61222&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/transportConnectors<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/broker<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- An embedded servlet engine for serving up the Admin console --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;jetty</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://mortbay.com/schemas/jetty/1.0&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;connectors<span style="font-weight: bold; color: black;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;nioConnector</span> <span style="color: #000066;">port</span>=<span style="color: #ff0000;">&quot;8161&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/connectors<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;handlers<span style="font-weight: bold; color: black;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;webAppContext</span> <span style="color: #000066;">contextPath</span>=<span style="color: #ff0000;">&quot;/admin&quot;</span> <span style="color: #000066;">resourceBase</span>=<span style="color: #ff0000;">&quot;${activemq.base}/webapps/admin&quot;</span> <span style="color: #000066;">logUrlOnStart</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/handlers<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/jetty<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/beans<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>Create the file <strong>/Library/LaunchDaemons/com.apache.activemq</strong> and place the following in it:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;plist</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;dict<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;key<span style="font-weight: bold; color: black;">&gt;</span></span></span>KeepAlive<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/key<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;true</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;key<span style="font-weight: bold; color: black;">&gt;</span></span></span>Label<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/key<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;string<span style="font-weight: bold; color: black;">&gt;</span></span></span>com.apache.activemq<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/string<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;key<span style="font-weight: bold; color: black;">&gt;</span></span></span>Program<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/key<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;string<span style="font-weight: bold; color: black;">&gt;</span></span></span>/usr/local/apache-activemq-5.1.0/bin/activemq<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/string<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;key<span style="font-weight: bold; color: black;">&gt;</span></span></span>WorkingDirectory<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/key<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;string<span style="font-weight: bold; color: black;">&gt;</span></span></span>/usr/local/apache-activemq-5.1.0<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/string<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/dict<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/plist<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>Load and start the ActiveMQ server:</p>
<p><code>sudo launchctl load /Library/LaunchDaemons/com.apache.activemq</code></p>
<p><code>sudo launchctl start com.apache.activemq</code></p>
<h3>Done!</h3>
<p>You now have ActiveMQ installed and setup to automatically run at startup.</p>
<p>You can reach the admin web console for your locally running ActiveMQ server by going to <a href="http://localhost:8161/admin">http://localhost:8161/admin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://swig505.com/2008/07/29/installing-and-configuring-activemq-on-mac-os-x/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
