• 安装RabbitMq


    安装参考:

    参考:https://www.jianshu.com/p/ed07a5a913c6 (简书:erlang版本过低啊,安装失败)

    参考:https://jingyan.baidu.com/article/456c463b16f3820a583144a1.html (百度:No package rabbitmq-server-3.6.8-1.el7.noarch.rpm available)

    安装过程:

    1,yum安装基本依赖

    yum -y update
    yum install gcc gcc-c++ glibc-devel make epel-release ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel git wget wxBase.x86_64 socat

    2,安装erlang依赖

    #一般安装:貌似版本偏低
    yum install -y erlang
    //验证是否成功
    erl #进入erlang执行环境
    
    #安装新版本的erlang
    wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
    rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
    yum install -y erlang
    erl -version

    3,安装rabbitmq

    //方法1:百度的(失败)
    //导入RabbitMQ源
    
    rpm -Uvh https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.8/rabbitmq-server-3.6.8-1.el7.noarch.rpm
    
    //安装RabbitMQ公共库秘钥
    
    rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
    
    //安装RabbitMQ:结果是 no package available
    
    yum install rabbitmq-server-3.6.8-1.el7.noarch.rpm
    
    
    //方法2:(知乎的:配合安装新版本的erlang成功了)
    //安装rabbitmq
    wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.15/rabbitmq-server-3.7.15-1.el7.noarch.rpm
    
    //导入秘钥
    rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
    
    //安装
    yum install rabbitmq-server-3.7.15-1.el7.noarch.rpm

    4,操作和管理

    #安装成功后需要启动
    systemctl start rabbitmq-server
    systemctl enable rabbitmq-server
    
    
    # 启用web管理界面
    rabbitmq-plugins enable rabbitmq_management
    
    # guest用户只能用于localhost访问
    # 添加新用户及授权
    
    rabbitmqctl add_user fort fort #账号:fort 密码:fort
    
    rabbitmqctl set_user_tags fort administrator
    
    rabbitmqctl set_permissions -p / fort '.*' '.*' '.*'
    
    rabbitmqctl list_permissions
    
    # 访问ip:15672即可进入管理界面 #需要开启防火墙

    安装遇到问题

    1,yum源问题:参考: https://www.runoob.com/linux/linux-yum.html

    //备份默认的yum源
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    
    //配置国内163源
    wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
    mv CentOS7-Base-163.repo CentOS-Base.repo
    
    //生成缓存
    yum clean all
    yum makecache
    
    //配置rpm包
    rpm -uvh XXXX
    //使用rpm包安装
    yun intall XXXX

    2,安装RabbitMQ报错

    rpm -ivh rabbitmq-server-3.6.15-1.el7.noarch.rpm 
    warning: rabbitmq
    -server-3.6.15-1.el7.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEY error: Failed dependencies: socat is needed by rabbitmq-server-3.6.15-1.el7.noarch

    //解决:
    yum install socat
  • 相关阅读:
    POJ——3070Fibonacci(矩阵快速幂)
    NOJ——1568走走走走走啊走(超级入门DP)
    NOJ——1624死胡同(胡搞模拟)
    jmeter断言
    jmeter问题
    廖雪峰Java9正则表达式-2正则表达式进阶-3分组匹配
    廖雪峰Java9正则表达式-1正则表达式入门-2正则表达式匹配规则
    廖雪峰Java9正则表达式-1正则表达式入门-1正则表达式简介
    使用uiautomator2进行webview页面的测试
    廖雪峰Java8JUnit单元测试-2使用JUnit-4超时测试
  • 原文地址:https://www.cnblogs.com/tkzc2013/p/13545151.html
Copyright © 2020-2023  润新知