1.下载ActiveMQ
wget https://archive.apache.org/dist/activemq/5.16.3/apache-activemq-5.16.3-bin.tar.gz
如果下载比较慢,可以进入官网下载,如下:
http://activemq.apache.org/components/classic/download/
然后将下载好的压缩包上传到linux环境下
2.安装ActiveMQ
2.安装ActiveMQ
安装路径如下:/usr/software/activemq
进入/usr/software/activemq目录下,解压activeMQ
[root@localhost Desktop]# cd /usr/software/activemq
[root@localhost activemq]# tar -xzvf apache-activemq-5.16.3-bin.tar.gz
3.启动ActiveMQ
进入/usr/software/activemq/apache-activemq-5.16.3/bin/linux-x86-64目录下,启动activeMQ
[root@localhost activemq]# cd /usr/software/activemq/apache-activemq-5.16.3/bin/linux-x86-64
[root@localhost linux-x86-64]# ./activemq start
4.开放端口
修改防火墙开启activemq端口8161(管理平台端口)和61616(通讯端口)
[root@localhost linux-x86-64]# vi + /etc/sysconfig/iptables
#添加下面两行
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8161 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 61616 -j ACCEPT
重启防火墙
service iptables restart
[root@localhost linux-x86-64]# service iptables restart
进入到activeMQ 的 bin 目录,执行 ./activemq start 开启 ,如下:
查看activeMQ 是不是启动的状态, ./activemq status ,如下:
停止 activemq 命令 ./activemq stop , 如下 :
5.验证
http://140.143.26.129:8161/admin/index.jsp
用户名:admin
密码:admin