一、下载
安装前请看下:Pre-Installation Requirements
http://activemq.apache.org/version-5-getting-started.html
并根据操作系统选择不同的安装方式。
我的机器是Centos6.5 64位的。安装的ActiveMQ的版本是apache-activemq-5.12.1
[hadoop@hftclclw0001 ~]$ pwd /home/hadoop [hadoop@hftclclw0001 ~]$ wget [hadoop@hftclclw0001 ~]$ tar -zxvf apache-activemq-5.12.1-bin.tar.gz
二、启动
[hadoop@hftclclw0001 ~] cd apache-activemq-5.12.1/bin [hadoop@hftclclw0001 ~] ./activemq start ... ... [hadoop@hftclclw0001 apache-activemq-5.12.1]$ netstat -apn|grep 8161
访问WebUI: http://hftclclw0001:8161/admin
默认是要输入用户秘密admin/admin
三、WebUI Jetty的配置
[hadoop@hftclclw0001 conf]$ pwd /home/hadoop/apache-activemq-5.12.1/conf [hadoop@hftclclw0001 conf]$ ll total 76 -rw------- 1 hadoop root 5911 Oct 12 17:56 activemq.xml -rw------- 1 hadoop root 1370 Oct 12 17:25 broker.ks -rw------- 1 hadoop root 592 Oct 12 17:25 broker-localhost.cert -rw------- 1 hadoop root 665 Oct 12 17:25 broker.ts -rw------- 1 hadoop root 1357 Oct 12 17:25 client.ks -rw------- 1 hadoop root 665 Oct 12 17:25 client.ts -rw------- 1 hadoop root 1172 Oct 12 17:56 credentials-enc.properties -rw------- 1 hadoop root 1121 Oct 12 17:56 credentials.properties -rw------- 1 hadoop root 962 Oct 12 17:56 groups.properties -rw------- 1 hadoop root 1087 Oct 12 17:56 jetty-realm.properties -rw------- 1 hadoop root 7433 Oct 12 17:56 jetty.xml => Jetty的配置文件 -rw------- 1 hadoop root 965 Oct 12 17:56 jmx.access -rw------- 1 hadoop root 964 Oct 12 17:56 jmx.password -rw------- 1 hadoop root 3084 Oct 12 17:56 log4j.properties -rw------- 1 hadoop root 1207 Oct 12 17:56 logging.properties -rw------- 1 hadoop root 1016 Oct 12 17:56 login.config -rw------- 1 hadoop root 961 Oct 12 17:56 users.properties [hadoop@hftclclw0001 conf]$ cat jetty.xml ... ... <bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService"> <property name="name" value="ActiveMQRealm" /> <property name="config" value="${activemq.conf}/jetty-realm.properties" /> </bean> <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint"> <property name="name" value="BASIC" /> <property name="roles" value="user,admin" /> <!-- set authenticate=false to disable login --> <property name="authenticate" value="true" /> =>如果该选项设置成了false,则不需要验证 </bean> ... ... 所有用户的账号、秘密、角色都是在${activemq.conf}/jetty-realm.properties中配置的。
原文:http://my.oschina.net/u/204498/blog/523035