• Red Hat (CentOS)-7 下安装RabbitMq


    安装RabbitMq

    curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
    yum install erlang
    rpm -qa | grep erlang
    yum -y install socat
    yum install -y rabbitmq-server-3.7.15-1.el7.noarch.rpm

    Web管理:

    rabbitmq-plugins enable rabbitmq_management

    然后访问:
    http://localhost:15672

    相关配置

    # 添加开机启动RabbitMQ服务
    sudo chkconfig rabbitmq-server on  

    # 启动服务
    systemctl start rabbitmq-server

    # 查看服务状态
    systemctl status rabbitmq-server

    # 停止服务
    systemctl stop rabbitmq-server
    # 查看当前所有用户
    rabbitmqctl list_users
    
    # 查看默认guest用户的权限
    rabbitmqctl list_user_permissions guest
    
    # 由于RabbitMQ默认的账号用户名和密码都是guest。为了安全起见, 先删掉默认用户
    rabbitmqctl delete_user guest
    
    # 添加新用户
    rabbitmqctl add_user username password
    
    # 设置用户tag
    rabbitmqctl set_user_tags username administrator
    
    # 赋予用户默认vhost的全部操作权限
    rabbitmqctl set_permissions -p / username ".*" ".*" ".*"
    
    # 查看用户的权限
    rabbitmqctl list_user_permissions username

    # 查看配置文件路径
    find / -name rabbitmq-defaults

    #到github上面找一个默认配置文件
    #修改默认配置,[]内表示只允许本地web访问的用户
    {loopback_users, []}


    附(坑):

    找不到配置文件
    首先更新数据库索引,命令:updatedb;
    然后使用locate命令查找,命令:locate rabbitmq.config.example
    
    复制配置文件:
    cp /usr/share/doc/rabbitmq-server-3.7.10/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
    
    修改配置文件:
    (注意(注意(注意)))
    去除注释(%%)后, 配置项的括号与','
  • 相关阅读:
    700. Search in a Binary Search Tree
    100. Same Tree
    543. Diameter of Binary Tree
    257. Binary Tree Paths
    572. Subtree of Another Tree
    226. Invert Binary Tree
    104. Maximum Depth of Binary Tree
    1、解决sublime打开文档,出现中文乱码问题
    移植seetafaceengine-master、opencv到ARM板
    ubuntu16.04-交叉编译-SeetaFaceEngine-master
  • 原文地址:https://www.cnblogs.com/archer-wen/p/11149653.html
Copyright © 2020-2023  润新知