Centos7安装ActiveMQ

绿林寻猫
2021-12-08 / 0 评论 / 220 阅读 / 正在检测是否收录...

安装ActiveMQ之前先安装JDK:jdk安装

1.创建activemq文件夹

[root@izwz91m0zmp2dk7b4n7afiz ~]# cd /home
[root@izwz91m0zmp2dk7b4n7afiz home]# mkdir acticemq

查看:

[root@izwz91m0zmp2dk7b4n7afiz home]# ls
acticemq  

2.下载压缩包

[root@izwz91m0zmp2dk7b4n7afiz home]# cd activemq
[root@izwz91m0zmp2dk7b4n7afiz activemq]# wget http://archive.apache.org/dist/activemq/5.14.5/apache-activemq-5.14.5-bin.tar.gz

3.解压

[root@izwz91m0zmp2dk7b4n7afiz activemq]# ls
apache-activemq-5.14.5-bin.tar.gz
[root@izwz91m0zmp2dk7b4n7afiz activemq]# tar -zxvf apache-activemq-5.14.5-bin.tar.gz

4.查看下载后的文件,修改文件名

[root@izwz91m0zmp2dk7b4n7afiz activemq]# ls
apache-activemq-5.14.5	apache-activemq-5.14.5-bin.tar.gz
[root@izwz91m0zmp2dk7b4n7afiz activemq]# mv apache-activemq-5.14.5 activemq

5.进入bin目录,启动activemq

[root@izwz91m0zmp2dk7b4n7afiz activemq]# cd activemq
[root@izwz91m0zmp2dk7b4n7afiz activemq]# ls
LICENSE  NOTICE  README.txt  activemq-all-5.14.5.jar  bin  conf  data  docs  examples  lib  webapps  webapps-demo
[root@izwz91m0zmp2dk7b4n7afiz activemq]# cd bin
[root@izwz91m0zmp2dk7b4n7afiz bin]# ls
activemq  activemq-diag  activemq.jar  env  linux-x86-32  linux-x86-64	macosx	wrapper.jar
[root@izwz91m0zmp2dk7b4n7afiz bin]# ./activemq start

查看进程:

[root@izwz91m0zmp2dk7b4n7afiz bin]# ps -ef| grep activemq

开放端口:

添加端口→加载生效→查看

[root@izwz91m0zmp2dk7b4n7afiz bin]# firewall-cmd --zone=public --add-port=8161/tcp --permanent 
success
[root@izwz91m0zmp2dk7b4n7afiz bin]# firewall-cmd --zone=public --add-port=61616/tcp --permanent 
success
[root@izwz91m0zmp2dk7b4n7afiz bin]# firewall-cmd --reload  
success
[root@izwz91m0zmp2dk7b4n7afiz bin]# firewall-cmd --zone=public --list-ports
8161/tcp 61616/tcp

如果是云服务器记得在安全组添加服务器的端口,否则访问不了

6.登录验证

http://ip地址:8161/admin  

用户名:admin 密码:admin

 

至此安装成功

 

 

 

 

 

 

 

 

 

 

 

0

评论 (0)

取消