zoukankan      html  css  js  c++  java
  • Install RabbitMQ on CentOS 7

    NOTE: this article is only for CentOS 7

    How to Install RabbitMQ on CentOS 7

    yum update
    
    

    Install erlang

    Reference: Install erlang (> v20)

    Create file in /etc/yum.repos.d/rabbitmq_erlang.repo

    # In /etc/yum.repos.d/rabbitmq_erlang.repo
    [rabbitmq_erlang]
    name=rabbitmq_erlang
    baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/$basearch
    repo_gpgcheck=1
    gpgcheck=0
    enabled=1
    gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
    sslverify=1
    sslcacert=/etc/pki/tls/certs/ca-bundle.crt
    metadata_expire=300
    
    [rabbitmq_erlang-source]
    name=rabbitmq_erlang-source
    baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/SRPMS
    repo_gpgcheck=1
    gpgcheck=0
    enabled=1
    gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
    sslverify=1
    sslcacert=/etc/pki/tls/certs/ca-bundle.crt
    metadata_expire=300
    

    Then run yum install erlang to install erlang package.

    Install RabbitMQ

    RabbitMQ signing key

    Before the Yum repository can be used, RabbitMQ signing key must be imported first. This makes RPM tools trust the signature on the packages provided in the repository. To do so, run rpm --import as a superuser:

    rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
    

    create repo file /etc/yum.repos.d/rabbitmq.repo (NOTE: this for CentOS 7)

    [bintray-rabbitmq-server]
    name=bintray-rabbitmq-rpm
    baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/7/
    gpgcheck=0
    repo_gpgcheck=0
    enabled=1
    

    Install rabbitmq-server

    I guess that the guideline is incorrect for the command yum install rabbitmq-server-3.7.15-1.el7.noarch.rpm and I got error like "No package rabbitmq-server-3.7.15-1.el7.noarch.rpm available.".
    And then I manually download the latest version rabbitmq-server-3.7.15-1.el7.noarch.rpm from bintray: rabbitmq-server and use the command yum install rabbitmq-server-3.7.15-1.el7.noarch.rpm and get rabbitMQ installed.

    Maybe I should try yum install rabbitmq-server.

    Start RabbitMQ

    The server is not started as a daemon by default when the RabbitMQ server package is installed. To start the daemon by default when the system boots, as an administrator run

    chkconfig rabbitmq-server on
    

    Here is the output:

    [slin@zero downloads]$ sudo chkconfig rabbitmq-server on
    Note: Forwarding request to 'systemctl enable rabbitmq-server.service'.
    Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
    

    As an administrator, start and stop the server as usual:

    /sbin/service rabbitmq-server start
    
    /sbin/service rabbitmq-server stop
    

    Access RabbitMQ management console

    For this section, you can also refer to access RabbitMQ management console
    RabbitMQ management console will allow you to monitor the server processes via a web browser.

    To enable the RabbitMQ management console, run the following command:

    rabbitmq-plugins enable rabbitmq_management
    chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
    

    Now. open your web browser and navigate to the following URL to access your RabbitMQ server management console.

    http://ip-address:15672/

    The default user name and password of RabbitMQ Management console is ‘guest’ and ‘guest’ (but it can only be logged in localhost).

    However, you can create a new admin user if you want.

    To do so, run:

    rabbitmqctl add_user mqadmin mqadmin
    rabbitmqctl set_user_tags mqadmin administrator
    rabbitmqctl set_permissions -p / mqadmin ".*" ".*" ".*"
    
  • 相关阅读:
    Leetcode665.Non-decreasing Array非递减数组
    在MyEclipse中把多行代码用一快捷键注释掉
    struts2中addFieldError()方法
    [bzoj2588][Spoj10628]Count on a tree_主席树
    [bzoj3123][Sdoi2013]森林_主席树_启发式合并
    [bzoj1500][NOI2005]维修数列_非旋转Treap
    [bzoj1452][JSOI2009]Count_树状数组
    [bzoj1369][Baltic2003]Gem_树形dp_结论题
    [bzoj1195][HNOI2006]最短母串_动态规划_状压dp
    [bzoj2242][Sdoi2011]计算器_exgcd_BSGS
  • 原文地址:https://www.cnblogs.com/swlin/p/10963393.html
Copyright © 2011-2022 走看看