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
相关推荐
真上帝的左手12 小时前
31. 占位-14
分布式·spring cloud·架构·系统架构
TiDB 社区干货传送门13 小时前
当向量走向百亿规模:平凯数据库对下一代分布式向量索引的探索
数据库·分布式
starzy199017 小时前
Structured Streaming Sink 种类与案例:选错输出端,前面全白干
大数据·分布式·spark
Lansonli2 天前
大数据Spark(九十三):Spark HistoryServer
大数据·分布式·spark
jaysee-sjc2 天前
【黑马点评】Day02:优惠券秒杀与分布式锁
java·分布式·nginx·spring·node.js·tomcat·maven
Lansonli4 天前
大数据Spark(九十二):Spark WebUI介绍
大数据·分布式·spark
bksczm4 天前
Redis Cluster 分片集群详解:槽路由、故障判定与扩缩容
数据库·redis·分布式
txxzjmzlh4 天前
RabbitMQ安装
分布式·rabbitmq
AI源码5 天前
基于Spark的期刊推荐系统的设计与实现
大数据·分布式·spark
国科安芯6 天前
CAN FD一升到5Mbps就误码:位定时、终端与共模的现场排查顺序——ASM1042S2S在星载分布式总线中的FAE实践
分布式·安全·架构·canfd·dcdc·抗辐射·载荷