安装使用 ActiveMQ Apollo

下载


1
2
3
4
5
6
7
<span class="token function">wget</span> http<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span><span class="token function">ftp</span><span class="token punctuation">.</span>kddilabs<span class="token punctuation">.</span>jp<span class="token operator">/</span>infosystems<span class="token operator">/</span>apache<span class="token operator">/</span>activemq<span class="token operator">/</span>activemq<span class="token operator">-</span>apollo<span class="token operator">/</span><span class="token number">1.7</span><span class="token punctuation">.</span>1<span class="token operator">/</span>apache<span class="token operator">-</span>apollo<span class="token operator">-</span><span class="token number">1.7</span><span class="token punctuation">.</span>1<span class="token operator">-</span>unix<span class="token operator">-</span>distro<span class="token punctuation">.</span><span class="token function">tar</span><span class="token punctuation">.</span>gz

<span class="token comment" spellcheck="true"># 将其解压到 /usr/local/activemq-apollo 目录
</span>
<span class="token comment" spellcheck="true"># 创建目录
</span><span class="token function">mkdir</span> <span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>activemq<span class="token operator">-</span>apollo
<span class="token function">tar</span> xvzf apache<span class="token operator">-</span>apollo<span class="token operator">-</span><span class="token number">1.7</span><span class="token punctuation">.</span>1<span class="token operator">-</span>unix<span class="token operator">-</span>distro<span class="token punctuation">.</span><span class="token function">tar</span><span class="token punctuation">.</span>gz  <span class="token operator">-</span>C <span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>activemq<span class="token operator">-</span>apollo <span class="token operator">--</span>strip<span class="token operator">-</span>components<span class="token operator">=</span><span class="token number">1</span>

创建 broker


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<span class="token comment" spellcheck="true"># 先创建broker存储目录
</span><span class="token function">mkdir</span> <span class="token operator">/</span>data<span class="token operator">/</span>apollo<span class="token operator">/</span>

<span class="token comment" spellcheck="true"># 创建broker
</span>$ <span class="token function">cd</span> <span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>activemq<span class="token operator">-</span>apollo
$ bin<span class="token operator">/</span>apollo create <span class="token operator">/</span>data<span class="token operator">/</span>apollo<span class="token operator">/</span>broker
Creating apollo instance at<span class="token punctuation">:</span> <span class="token operator">/</span>data<span class="token operator">/</span>apollo<span class="token operator">/</span>broker
Generating ssl keystore<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>

You can now start the broker by executing<span class="token punctuation">:</span>

   <span class="token string">"/data/apollo/broker/bin/apollo-broker"</span> run

Or you can setup the broker as system <span class="token function">service</span> and run it <span class="token keyword">in</span> the background<span class="token punctuation">:</span>

   <span class="token function">sudo</span> <span class="token function">ln</span> <span class="token operator">-</span>s <span class="token string">"/data/apollo/broker/bin/apollo-broker-service"</span> <span class="token operator">/</span>etc<span class="token operator">/</span>init<span class="token punctuation">.</span>d<span class="token operator">/</span>
   <span class="token operator">/</span>etc<span class="token operator">/</span>init<span class="token punctuation">.</span>d<span class="token operator">/</span>apollo<span class="token operator">-</span>broker<span class="token operator">-</span><span class="token function">service</span> start

配置web admin


1
<span class="token function">sed</span> <span class="token operator">-</span>i <span class="token string">'s/127.0.0.1:61680/192.168.2.11:61680/'</span> <span class="token operator">/</span>data<span class="token operator">/</span>apollo<span class="token operator">/</span>broker<span class="token operator">/</span>etc<span class="token operator">/</span>apollo<span class="token punctuation">.</span>xml

启动服务


1
2
<span class="token function">ln</span> <span class="token operator">-</span>s <span class="token string">"/data/apollo/broker/bin/apollo-broker-service"</span> <span class="token operator">/</span>etc<span class="token operator">/</span>init<span class="token punctuation">.</span>d<span class="token operator">/</span>
<span class="token function">service</span>  apollo<span class="token operator">-</span>broker<span class="token operator">-</span><span class="token function">service</span> start

Leave a Comment.