• 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
    
    • 1
    • 2
    • 3

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

    三、安装 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
    
    • 1
    • 2
    • 3

    如果安装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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37

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

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

    四 RabbitMQ Web界面管理

    rabbitmq-plugins enable rabbitmq_management
    
    • 1

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

    systemctl restart rabbitmq-server
    systemctl enable rabbitmq-server
    
    • 1
    • 2

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

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
  • 相关阅读:
    【LeetCode与《代码随想录》】哈希表篇:做题笔记与总结-JavaScript版
    第18章 用于大型程序的工具【C++】
    【集群迁移】使用Shell脚本获取老集群整个Hive库的建库、建表DDL
    1、验证1101序列(Moore)
    windows11 安装Nodejs
    数学笔记1
    vue3.0引入百度地图并标记点
    基于Java汽车服务商城系统 设计实现(源码+lw+部署文档+讲解等)
    vue3+ts+element-plus el-table组件二次封装(Vue3项目)
    【附源码】计算机毕业设计JAVA装修网站
  • 原文地址:https://blog.csdn.net/qq_36491545/article/details/132907892