zoukankan      html  css  js  c++  java
  • 官网脚本快速安装rabbitmq

    最近有安装一次rabbitmq升级到3.8.5版本,这个安装真的是省事简单

    直接用官方脚本运行即可

    #!/bin/sh
    
    ## If sudo is not available on the system,
    ## uncomment the line below to install it
    # apt-get install -y sudo
    
    sudo apt-get update -y
    
    ## Install prerequisites
    sudo apt-get install curl gnupg -y
    
    ## Install RabbitMQ signing key
    curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -
    
    ## Install apt HTTPS transport
    sudo apt-get install apt-transport-https
    
    ## Add Bintray repositories that provision latest RabbitMQ and Erlang 23.x releases
    sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list <<EOF
    ## Installs the latest Erlang 23.x release.
    ## Change component to "erlang-22.x" to install the latest 22.x version.
    ## "bionic" as distribution name should work for any later Ubuntu or Debian release.
    ## See the release to distribution mapping table in RabbitMQ doc guides to learn more.
    deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang
    ## Installs latest RabbitMQ release
    deb https://dl.bintray.com/rabbitmq/debian bionic main
    EOF
    
    ## Update package indices
    sudo apt-get update -y
    
    ## Install rabbitmq-server and its dependencies
    sudo apt-get install rabbitmq-server -y --fix-missing

    启动管理平台:sudo rabbitmq-plugins enable rabbitmq_management

    启停命令:

    sudo rabbitmq-server start
    sudo rabbitmq-server stop
    sudo rabbitmq-server restart
    sudo rabbitmqctl status

    启动后:

    rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问,如果此时用guest:guest登陆会报错: rabbitmq User can only log in via localhost

    此时需要添加用户,我们添加admin:admin。

    sudo rabbitmqctl add_user  admin  admin  

    赋予权限

    sudo rabbitmqctl set_user_tags admin administrator

    赋予virtual host中所有资源的配置、写、读权限以便管理其中的资源

    sudo rabbitmqctl  set_permissions -p / admin '.*' '.*' '.*'

    再次登陆成功

  • 相关阅读:
    零基础学Python-第一章 :Python介绍和安装-02.Python的发展历史与版本
    零基础学Python_汇总贴
    零基础学Python-第一章 :Python介绍和安装-01.Python语言的特点
    Spring cloud微服务安全实战-3-11API安全机制之登录
    iOS play video
    Http Live Streaming 实现iphone在线播放视频[转]
    UIWebView分页显示
    ios7适配--uitableviewcell选中效果
    ios7 设置status bar风格
    ios7适配--隐藏status bar
  • 原文地址:https://www.cnblogs.com/xiaoyao-001/p/13207786.html
Copyright © 2011-2022 走看看