zoukankan      html  css  js  c++  java
  • 安装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
  • 相关阅读:
    一步步用新浪SAE免费教大家搭建个人博客(wordpress 3.0.4 for SAE )
    欢迎大家来访西北狼网络乌托邦
    教大家如何让新浪SAE上安装wordpress实现伪静态
    CSDN 600万用户数据信息泄露并道歉
    推荐5款好用的屏幕录像软件
    IPv6无法解决全部安全问题
    详解STP以及工作过程
    如何在WordPress中实现彩色标签云
    EIGRP和RIP的一个综合性很强的实验(变态实验之一)
    查看系统等待的sql
  • 原文地址:https://www.cnblogs.com/tkzc2013/p/13545151.html
Copyright © 2011-2022 走看看