RabbitMQ development environment installation and deployment

File

Foreword

Fedora and RHEL library inside RabbitQM no longer maintain the recommended choice Bintray.

text

Binary also be used to install Erlang (rabbitmq of written language). Servers Centos 7.7. Non- cluster model.

installation

  1. Import sign key, so that yum can trust inside the package. userpm --import

    rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
    
    
  2. Increased /etc/yum.repos.d/rabbitmq.repofile, as follows. baseurl inside the last /v3.8.x/el/7/7 corresponds to system version, centos8 to/v3.8.x/el/8/

    [bintray-rabbitmq-server]
    name=bintray-rabbitmq-rpm
    baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.8.x/el/7/ 
    gpgcheck=0
    repo_gpgcheck=0
    enabled=1
    
    
  3. RabbitMQ version 3.7 in 2020 to discontinue the maintenance, choose the new 3.8 version.

  4. Download the rpm files.

    wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.3/rabbitmq-server-3.8.3-1.el7.noarch.rpm
    
    
  5. Installed via yum File

    yum install rabbitmq-server-3.8.3-1.el7.noarch.rpm -y
    
    

Configuration

Configured as a daemon from the start

chkconfig rabbitmq-server on

Start and stop

systemctl start rabbitmq-server
systemctl stop rabbitmq-server
systemctl restart rabbitmq-server

Development and testing environment configuration

Services default setting basic enough.

Production environment configuration

Accounting for a bit before the configure . production-checklist

port

System's firewall will affect communication, we need to open some ports. More commonly used

  • 5672/5671 non-secure client / port security
  • 15672 Enable managementplug-ins when the http api client, management UI, rabbitmqadmin
  • 1883/8883, MQTTthe MQTT client-side plug-in non-secure / safe port.
  • 61613/61614, STOMPnon-safety / security client plug-in port

Configuration management UI

Access Address: HTTP: // ip: 15672

  1. on off

    rabbitmq-plugins enable rabbitmq_management #开启rabbitmq_management,对应有disable
    
    
  2. Add users, give permission

    By default there is a guest / guest user, but can only access localhost.

    rabbitmqctl add_user full_access 111111 # 创建full_access 用户,密码111111
    rabbitmqctl set_user_tags full_access administrator # 给用户赋administrator角色
    
    
  3. View user, you can see there are two users.

    [root@test ~]# rabbitmqctl list_users
    Listing users ...
    user	tags
    guest	[administrator]
    full_access	[administrator]
    
    

Guess you like

Origin www.cnblogs.com/sheldon-lou/p/12667416.html