centos7 安装 rabbitmq

一、windows 上下载依赖文件以及安装文件

https://d28dx6y1hfq314.cloudfront.net/828/1033/el/7/package_files/1305009.rpm?t=1694767188_8bd28780066a52b94cc2edfb2b7f574333d72318

https://d28dx6y1hfq314.cloudfront.net/828/1039/el/7/package_files/1038460.rpm?t=1694767132_8b19990c49052cb3361c3508e0ba750b972b19b7

二、将下载后的文件上传至服务器

三、安装 erlang和 rabbitmq

首先安装 erlang ,安装成功之后才安装 rabbitmq

yum localinstall erlang-22.3.4.12-1.el7.x86_64.rpm
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum localinstall rabbitmq-server-3.8.13-1.el7.noarch.rpm

如果安装erlang出现以下错误说明之前安装过,先进行删除,其中 package 之后的代表是版本 需要进行删除

Transaction check error:
  file /usr/lib64/erlang/bin/epmd from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/erl from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/erlc from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/escript from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/run_erl from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/to_erl from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/no_dot_erlang.boot from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/start from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/start.boot from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/start.script from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/start_clean.boot from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/start_erl from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/bin/start_sasl.boot from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/driver_int.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_driver.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_drv_nif.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_fixed_size_int_types.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_int_sizes_config.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_memory_trace_parser.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_nif.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_nif_api_funcs.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/lib/liberts.a from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/lib/liberts_r.a from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/ei.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/ei_connect.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/eicode.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/include/erl_interface.h from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/lib/libei.a from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/lib/libei_st.a from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/lib/liberl_interface.a from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/usr/lib/liberl_interface_st.a from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/releases/RELEASES from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/releases/RELEASES.src from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64
  file /usr/lib64/erlang/releases/start_erl.data from install of erlang-22.3.4.12-1.el7.x86_64 conflicts with file from package erlang-erts-R16B-03.18.el7.x86_64

Error Summary

删除之前的 erlang 版本 ,之后再继续执行上面的安装教程

yum remove erlang-22.3.4.12-1.el7.x86_64  # 这个版本号换成上面package 之后的那个

四 RabbitMQ Web界面管理

rabbitmq-plugins enable rabbitmq_management

五、启动 mq 服务设置开机启动

systemctl restart rabbitmq-server
systemctl enable rabbitmq-server

六、放开防火墙端口、添加登录账户 并访问

firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --zone=public --add-port=5672/tcp --permanent
systemctl restart firewalld

# 添加账户 guest 和 admin 都存在了的 
rabbitmqctl add_user 用户名 密码

# 设置用户分配操作权限。

rabbitmqctl set_user_tags 用户 administrator
相关推荐
星染xr2 小时前
kafka 生产经验——数据积压(消费者如何提高吞吐量)
分布式·kafka
东方巴黎~Sunsiny2 小时前
如何监控Kafka消费者的性能指标?
分布式·kafka
飞升不如收破烂~2 小时前
kafka
分布式·kafka
简 洁 冬冬2 小时前
037 RabbitMQ集群
rabbitmq·集群
龙哥·三年风水3 小时前
群控系统服务端开发模式-应用开发-前端个人信息功能
分布式·vue·群控系统
小码哥呀4 小时前
RabbitMQ集群搭建
分布式·rabbitmq
材料苦逼不会梦到计算机白富美5 小时前
golang分布式缓存项目 Day6 防止缓存击穿
分布式·缓存·golang
Yz98766 小时前
Kafka面试题
大数据·分布式·zookeeper·kafka·big data
.生产的驴7 小时前
SpringBootCloud 服务注册中心Nacos对服务进行管理
java·spring boot·spring·spring cloud·tomcat·rabbitmq·java-rabbitmq
林子漾8 小时前
【paper】分布式无人水下航行器围捕智能目标
分布式·wpf