安装activemq
wget http://archive.apache.org/dist/activemq/5.14.5/apache-activemq-5.14.5-bin.tar.gz
mkdir /usr/local/activemq
tar -xzf apache-activemq-5.14.5-bin.tar.gz
mv apache-activemq-5.14.5 /usr/local/activemq
rm apache-activemq-5.14.5-bin.tar.gz
配置activemq
cd /etc/init.d/
vi activemq
activemq文件内容:
#!/bin/sh
#
# /etc/init.d/activemq
# chkconfig: 345 63 37
# description: activemq servlet container.
# processname: activemq 5.14.1
# Source function library.
#. /etc/init.d/functions
# source networking configuration.
#. /etc/sysconfig/network
export JAVA_HOME=/usr/java/jdk1.8.0_121
export CATALINA_HOME=/usr/local/activemq/apache-activemq-5.14.5
case $1 in
start)
sh $CATALINA_HOME/bin/activemq start
;;
stop)
sh $CATALINA_HOME/bin/activemq stop
;;
restart)
sh $CATALINA_HOME/bin/activemq stop
sleep 1
sh $CATALINA_HOME/bin/activemq start
;;
esac
exit 0
更改权限、自启动
chmod 777 activemq
chkconfig activemq on
启动及其他命令
#查看activemq状态
service activemq status
#其他和关闭activemq服务
service activemq start
service activemq stop
#设置开机启动或不启动activemq服务
chkconfig activemq on
chkconfig activemq off
访问
访问:
http://IP地址:8161
默认用户名密码为:admin/admin
修改端口
打开activemq.xml文件
cd /usr/local/activemq/apache-activemq-5.14.5/conf
vi activemq.xml
#查找transportConnectors
:/transportConnectors 回车
修改管理页面的8161端口
还是在conf文件夹下
修改jetty.xml,修改内容容器jetty的默认启动端口,找到默认的8161后修改
修改密码
vim jetty-realm.properties
admin:123456 admin