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
相关推荐
jakeswang2 小时前
应用缓存不止是Redis!——亿级流量系统架构设计系列
redis·分布式·后端·缓存
不久之4 小时前
大数据服务完全分布式部署- 其他组件(阿里云版)
分布式·阿里云·云计算
Direction_Wind5 小时前
粗粮厂的基于spark的通用olap之间的同步工具项目
大数据·分布式·spark
tan77º19 小时前
【项目】分布式Json-RPC框架 - 项目介绍与前置知识准备
linux·网络·分布式·网络协议·tcp/ip·rpc·json
BYSJMG20 小时前
计算机大数据毕业设计推荐:基于Hadoop+Spark的食物口味差异分析可视化系统【源码+文档+调试】
大数据·hadoop·分布式·python·spark·django·课程设计
Viking_bird1 天前
Apache Spark 3.2.0 开发测试环境部署指南
大数据·分布式·ajax·spark·apache
励志成为糕手1 天前
企业级Spring事务管理:从单体应用到微服务分布式事务完整方案
分布式·spring·微服务·隔离级别·事务管理
Fireworkitte1 天前
Kafka的ISR、OSR、AR详解
分布式·kafka·ar
DjangoJason2 天前
C++ 仿RabbitMQ实现消息队列项目
开发语言·c++·rabbitmq