首页 > 其他分享 >ActiveMQ安装

ActiveMQ安装

时间:2023-11-20 21:45:20浏览次数:28  
标签:ActiveMQ java x86 安装 64 apache root activemq

ActiveMQ单机安装

下载链接https://activemq.apache.org/components/classic/download/

安装jdk8

  • 查询yum库中java版本
[root@localhost ~]# yum list java*
已加载插件:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
可安装的软件包
java-1.6.0-openjdk.x86_64                 1:1.6.0.41-1.13.13.1.el7_3            local
java-1.6.0-openjdk-devel.x86_64           1:1.6.0.41-1.13.13.1.el7_3            local
java-1.7.0-openjdk.x86_64                 1:1.7.0.141-2.6.10.5.el7              local
java-1.7.0-openjdk-devel.x86_64           1:1.7.0.141-2.6.10.5.el7              local
java-1.7.0-openjdk-headless.x86_64        1:1.7.0.141-2.6.10.5.el7              local
java-1.8.0-openjdk.x86_64                 1:1.8.0.131-11.b12.el7                local
java-1.8.0-openjdk-devel.x86_64           1:1.8.0.131-11.b12.el7                local
java-1.8.0-openjdk-headless.x86_64        1:1.8.0.131-11.b12.el7                local
java-atk-wrapper.x86_64                   0.30.4-5.el7                          local
javamail.noarch                           1.4.6-8.el7                           local
javapackages-tools.noarch                 3.4.1-11.el7                          local
javassist.noarch                          3.16.1-10.el7                         local
  • 需要安装java-1.8.0-openjdk.x86_64java-1.8.0-openjdk-devel.x86_64
[root@localhost ~]# yum -y install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
  • 查看java版本
[root@localhost ~]# java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

安装ActiveMQ

  • 创建解压路径及解压缩
[root@localhost ~]# ll
总用量 62716
-rw-------. 1 root root     1262 1月  23 2019 anaconda-ks.cfg
-rw-r--r--  1 root root 64213100 9月  29 11:38 apache-activemq-5.16.5-bin.tar.gz
[root@localhost ~]# mkdir /data
[root@localhost ~]# tar -zxvf apache-activemq-5.16.5-bin.tar.gz -C /data/
  • 编辑/data/apache-activemq-5.16.5/conf/jetty.xml
[root@localhost ~]# vi /data/apache-activemq-5.16.5/conf/jetty.xml
119         <property name="host" value="127.0.0.1"/>

# 将127.0.0.1替换为0.0.0.0

119         <property name="host" value="0.0.0.0"/>

启动ActiveMQ

[root@localhost ~]# /data/apache-activemq-5.16.5/bin/linux-x86-64/activemq start

验证

  • 网页登录IP:8161
  • 默认密码:admin/admin

Active集群安装

基本环境

节点 IP openwire admin端口
broker1 192.168.100.105 61616 8161
broker2 192.168.100.106 61616 8161
broker3 192.168.100.107 61616 8161

安装ActiveMQ

  • 配置hosts,三台配置一致
[root@broker1 ~]# cat <<EOF >>/etc/hosts
192.168.100.105 broker1
192.168.100.106 broker2
192.168.100.107 broker3
EOF
  • 安装java-1.8.0-openjdk.x86_64java-1.8.0-openjdk-devel.x86_64,三台配置一致
[root@broker1 ~]# yum -y install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
  • 创建解压路径及解压缩,三台配置一致
[root@broker1 ~]# ll
总用量 62716
-rw-------. 1 root root     1262 1月  23 2019 anaconda-ks.cfg
-rw-r--r--  1 root root 64213100 9月  29 11:38 apache-activemq-5.16.5-bin.tar.gz
[root@localhost ~]# mkdir /data
[root@localhost ~]# tar -zxvf apache-activemq-5.16.5-bin.tar.gz -C /data/

修改配置

  • 编辑activemq.xml
[root@broker1 ~]# vi /data/apache-activemq-5.16.5/conf/activemq.xml
40     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker1" dataDirectory="${activemq.data}">

[root@broker2 ~]# vi /data/apache-activemq-5.16.5/conf/activemq.xml
40     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker2" dataDirectory="${activemq.data}">

[root@broker3 ~]# vi /data/apache-activemq-5.16.5/conf/activemq.xml
40     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker3" dataDirectory="${activemq.data}">
  • 添加配置broker2broker3
[root@broker2 ~]# vi /data/apache-activemq-5.16.5/conf/activemq.xml
在<transportConnectors>标签前添加如下内容:注意,此处的IP为节点1的服务器IP
111         <networkConnectors>
112                 <networkConnector uri="static:(tcp://192.168.100.105:61616)" duplex="true"/>
113         </networkConnectors>

[root@broker3 ~]# vi /data/apache-activemq-5.16.5/conf/activemq.xml
在<transportConnectors>标签前添加如下内容:注意,此处的IP为节点1的服务器IP
<networkConnectors>
 <networkConnector uri="static:(tcp://192.168.100.105:61616,tcp://192.168.100.105:61616)" duplex="true"/>         
</networkConnectors>
  • 修改jetty.xml,将host改为本机IP
[root@broker1 ~]# vi /data/apache-activemq-5.16.5/conf/jetty.xml
119         <property name="host" value="192.168.100.105"/>

[root@broker2 ~]# vi /data/apache-activemq-5.16.5/conf/jetty.xml
119         <property name="host" value="192.168.100.106"/>

[root@broker3 ~]# vi /data/apache-activemq-5.16.5/conf/jetty.xml
119         <property name="host" value="192.168.100.107"/>

启动验证

[root@broker1 ~]# /data/apache-activemq-5.16.5/bin/linux-x86-64/activemq start
[root@broker2 ~]# /data/apache-activemq-5.16.5/bin/linux-x86-64/activemq start
[root@broker3 ~]# /data/apache-activemq-5.16.5/bin/linux-x86-64/activemq start

标签:ActiveMQ,java,x86,安装,64,apache,root,activemq
From: https://www.cnblogs.com/lzexin/p/17844955.html

相关文章

  • npm脚手架安装
    这里举两个例子,也是我们常用到的第一个是cnpm淘宝镜像由于npm是国外服务器提供,下载速度会慢一点,所以推荐更换镜像源为cnpm,首先新建一个vue项目文件夹,按住shift键以及鼠标右键,进入powershell终端界面,输入命令行**npminstall-gcnpm--registry=https://registry.npm.taobao.o......
  • linux 安装keepalived
    1.下载安装包然后解压  1解压tar-zxvfkeepalived-2.2.2.tar.gzcd /opt/keepalived-2.2.2 ./configure--prefix=/usr/local/keepalived  有时候可能会报这个错误信息,此时只需要安装 libnl/libnl-3 依赖即可,输入 yum-yinstalllibnllibnl-deve***WARNIN......
  • OPNsense安装与使用
    OPNsense安装与使用本文参考OPNsense中文手册、OPNsense防火墙系列一:安装、基础配置(PPPoE、IPv6、更换软件源)(都是优秀文章和作者,有问题推荐看看他们的文章)简介为了管控IPV6和为了一定程度上的安全性,我从爱快转到了OPNsense。以下来自OPNsense简介OPNsense®是一个开......
  • 苹果电脑 Adobe2023 全家桶 Mac 直装版 最新下载安装
    每一个软件都是亲测上传,都是目前最新的,简化了安装流程适用于小白,全部都是无脑直接安装。Adobe2023全家桶直装版更新日期2023-06-11,包含:AdobeIllustrator、AdobeAcrobatProDC、AdobePremierePro、AdobeAudition、AdobePhotoshop、LightroomClassic、AdobeAfter......
  • centos7上安装tkinter
    报错:YoumustinstalltkinteronLinuxtouseMouseInfo.Runthefollowing:sudoapt-getinstallpython3-dev1#yuminstall-ytktk-develtcltcl-devel2重新编译Python$./configure--with-tcltk-includes='-I/usr/local/include'--with-tcltk-l......
  • docker安装及安装redis
    一、安装docker1.准备安装环境:yuminstall-yyum-utils2.设置镜像仓库为阿里云:yum-config-manager\--add-repo\http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo3.更新系统yum软件索引:yumcleanallyummakecache4.安装docker:yuminstalldocker-c......
  • docker于centos7下的安装配置
    docker于centos7下的安装配置导航目录docker于centos7下的安装配置导航一、安装前的环境配置检查自己版本,必须是centos7以及以上版本cat/etc/redhat-release卸载旧版本(如果之前没有安装过,这步可以忽略)yum安装gcc相关安装需要的软件包设置镜像源更新yum软件包索引二、安装docke......
  • Centos 安装nginx
    一、添加Nginx到YUM源sudorpm-Uvhhttp://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm二、安装nginx#sudoyuminstall-ynginx三、启动nginx#sudosystemctlstartnginx.service四、开机启动#sudosystemctlenable......
  • golang环境和第三方爬虫包下载安装一把成
    复制代码在CentOS7.6中命令行中全部粘贴执行,golang环境和第三方爬虫包全部安装一把成。wgethttps://golang.google.cn/dl/go1.21.4.linux-amd64.tar.gztar-zxvfgo1.21.4.linux-amd64.tar.gz-C/usr/local/cat>>.bash_profile<<"EOF"exportGOROOT=/usr/local/goexpo......
  • Centos7 使用yum从第三方仓库安装Python3.8
    环境:CentOSLinuxrelease7.9.2009起因:Centos7自带Python2.7.5版本。而默认的YUM安装的python3是3.6版本,遂升级到3.8版本。installPython3.8yuminstall-ycentos-release-scl#仓库注册yuminstall-yrh-python38which#安装python3.8#创建软连接ln-s/opt......