Apache Apollo安装
一、概述
ActiveMQ Apollo is a faster, more reliable, easier to maintain messaging broker built from the foundations of the original ActiveMQ. It accomplishes this using a radically different threading and message dispatching architecture. Like ActiveMQ, Apollo is a multi-protocol broker and supports STOMP, AMQP, MQTT, Openwire, SSL, and WebSockets.
Apollo以ActiveMQ原型为基础,是一个更快、更可靠、更易于维护的消息代理工具。Apache称Apollo为最快、最强健的STOMP(Streaming Text Orientated Message Protocol,流文本定向消息协议)服务器. 它采用一个完全不同的消息分发架构,同ActiveMQ一样支持多种协议。如STOMP,AMQP,MQTT,Openwire,SSL和WebSockets.
二、安装(linux-debin)
1.下载 apache-apollo-1.7.1-unix-distro.tar.gz 适合自己系统的安装包
2.安装
上传apache-apollo-1.7.1-unix-distro.tar.gz到服务器
解压文件放到/opt目录下
tar -zxvf apache-apollo-1.7.1-unix-distro.tar.gz
3.创建broker实例
一个broker实例是一个文件夹,建议不要把实例同安装文件放在一起。
这里,我们将实例建在/var/lib/目录下面
cd /var/lib
/opt/apache-apollo-1.7.1/bin/apollo create mybroker
.
.
.
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore keystore -destkeystore keystore -deststoretype pkcs12".
You can now start the broker by executing:
"/var/lib/mybroker/bin/apollo-broker" run
Or you can setup the broker as system service and run it in the background:
sudo ln -s "/var/lib/mybroker/bin/apollo-broker-service" /etc/init.d/
/etc/init.d/apollo-broker-service start
/opt/apache-apollo-1.7.1/bin/apollo create mybroker 5.90s user 0.26s system 86% cpu 7.149 total
创建成功,/var/lib/mybroker的目录结构
bin #启动脚本
etc #配置文件
data #消息持久化数据
log #运行日志
tmp #临时文件
三、apollo管理后台和配置
vi /var/lib/mybroker/etc/apollo.xml
# 修改
http://127.0.0.1:61680
https://127.0.0.1:61681
#为(允许远程连接)
http://0.0.0.0:61680
https://0.0.0.0:61681
四、启动broker实例
/var/lib/mybroker/bin/apollo-broker run &
查看apollo进程
ps -ef|grep apollo
五、将apollo作为linux service启动
ln -s /var/lib/mybroker/bin/apollo-broker-service /etc/init.d/apollo
chkconfig apollo --add
六、访问Apollo的监控页面
web: http://localhost:61680/
默认用户名: admin
密码:password