linux下activemq安装与配置
1、安装JDK7以上, 下载地址: http://activemq.apache.org/download.html
选择第一条,是最新发布的稳定版;如果要选择其他版本,点击第二个
2、创建activemq目录
[root@instance-0pk09gjj ~]# cd /usr/local/
[root@instance-0pk09gjj local]# mkdir activemq
3、解压安装包
[root@instance-0pk09gjj local]# cd activemq/
[root@instance-0pk09gjj activemq]# tar zxvf apache-activemq-5.15.6-bin.tar.gz
4、配置环境变量
[root@instance-0pk09gjj /]# vi /etc/profile
#vi /etc/profile
#在文件中添加以下内容
export ACTIVEMQ_HOME=/usr/local/activemq/apache-activemq-5.15.6
export ACTIVEMQ_BIN=$ACTIVEMQ_HOME/bin
export PATH=${PATH}:${ACTIVEMQ_BIN}
使/etc/profile中修改的配置立刻生效
[root@instance-0pk09gjj /]# ./etc/profile
错误:
解决方案:
[root@instance-0pk09gjj /]# chmod +x /etc/profile
5、启动或关闭ActiveMq
启动:
[root@instance-0pk09gjj ~]# cd /usr/local/activemq/apache-activemq-5.15.6/bin
[root@instance-0pk09gjj bin]# ./activemq start
关闭:
[root@instance-0pk09gjj bin]# ./activemq stop
启动时不打印错误信息, 但是访问http://106.12.83.102:8161/admin/这个链接时请求不通(如下图)
解决方案:(查看activemq的日志文件)
[root@instance-0pk09gjj /]# cd /usr/local/activemq/apache-activemq-5.15.6/data/
我遇到的问题是端口冲突(修改activemq的配置文件)
修改之前:
修改之后:
[root@instance-0pk09gjj /]# cd /usr/local/activemq/apache-activemq-5.15.6/conf/
6、测试(默认登录名:admin 密码:admin)
请求路径: http://106.12.83.102:8161/admin/