CentOS online installation RabbitMQ3.7

  1. Install RabbitMQ online through yum command

Yum online installation, simple, fast, and automatic installation of dependent packages.

1. Install Erlang environment (RabbitMQ is developed by Erlang language)

1.1) Download the rpm installation package

Official address: http://www.erlang.org/downloads

wget -O erlang-20.3.4-1.el7.centos.x86_64.rpm https://bintray.com/rabbitmq/rpm/download_file?file_path=erlang%2F20%2Fel%2F7%2Fx86_64%2Ferlang-20.3.4-1.el7.centos.x86_64.rpm

1.2) Install Erlang

yum install -y erlang-20.3.4-1.el7.centos.x86_64.rpm

1.3) Check whether Erlang is installed successfully

[ root@localhost ~]# erl -version
Erlang(SMP,ASYNC_THREADS,HIPE)(BEAM) emulator version 9.3[root@localhost ~]# 

2. Install RabbitMQ

2.1 ) Download the rpm installation package

Official address: http://www.rabbitmq.com/download.html

wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.4/rabbitmq-server-3.7.4-1.el7.noarch.rpm

2.2) Install RabbitMQ

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

2.3) Check if RabbitMQ is installed successfully

[ root@localhost ~]# rabbitmqctl status
Status of node rabbit@localhost ...[{pid,14618},{running_applications,[{rabbitmq_management,"RabbitMQ Management Console","3.7.4"},{rabbitmq_management_agent,"RabbitMQ Management Agent","3.7.4"},{amqp_client,"RabbitMQ AMQP Client","3.7.4"},{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.7.4"},{cowboy,"Small, fast, modern HTTP server.","2.2.2"},{cowlib,"Support library for manipulating Web protocols.","2.1.0"},{rabbit,"RabbitMQ","3.7.4"},{rabbit_common,"Modules shared by rabbitmq-server and rabbitmq-erlang-client","3.7.4"},...

3. About service

3.1) Start the service

service rabbitmq-server start

3.2) Stop service

service rabbitmq-server stop

3.3) Set boot up

chkconfig rabbitmq-server on

4. User Management

4.1) View user list

[ root@localhost ~]# rabbitmqctl list_users
Listing users ...
guest   [administrator][root@localhost ~]# 

4.2) Add user

rabbitmqctl add_user username password

[ root@localhost ~]# rabbitmqctl add_user admin 123456
Adding user "admin"...[root@localhost ~]# 

4.3) Delete user

rabbitmqctl delete_user username

[ root@localhost ~]# rabbitmqctl delete_user admin
Deleting user "admin"...[root@localhost ~]# 

4.4) Modify user password

rabbitmqctl change_password username new password

[ root@localhost ~]# rabbitmqctl change_password admin 666666
Changing password for user "admin"...[root@localhost ~]# 

5. Role management

5.1) Role description

none (normal user)
No console operation authority.

management (ordinary administrator)
You can view the queues of the current user,exchanges and bindings.
You can view and close the current user's channels and connections.
You can view the statistics of the current user's virtual hosts.

policymaker (policy manager)
Have management permissions and view, create and delete the current user's policies and parameters.

monitoring (monitoring administrator)
Have management permissions
View all virtual hosts and global statistics
View connections and channels of all users
View all node data, such as clustering and memory usage

administrator (super administrator)
Have policymaker, monitoring permissions
View, create, delete all virtual hosts
View, create, delete all users
View, create, delete all permissions
Can close all users' connections

5.2) View user roles

rabbitmqctl list_users username

[ root@localhost ~]# rabbitmqctl list_users
Listing users ...
admin   [administrator]
guest   [administrator][root@localhost ~]# 

5.3) Set user roles

rabbitmqctl set_user_tags admin role name (supports simultaneous setting of multiple roles)

[ root@localhost ~]# rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator]...[root@localhost ~]# 

6. authority management

User authority refers to the user's operation authority to exchange and queue, including configuration authority, read and write authority. The configuration permissions will affect the declaration and deletion of exchange and queue. Read and write permissions will affect queue read and write messages, exchange send messages, and the binding operation of queue and exchange.

6.1) View user permissions

rabbitmqctl list_user_permissions username

[ root@localhost ~]# rabbitmqctl list_user_permissions guest
Listing permissions for user "guest".../.*.*.*[root@localhost ~]# 

6.2) Set user permissions

rabbitmqctl set_permissions -p virtual host name username

[ root@localhost ~]# rabbitmqctl set_permissions -p / admin '.*''.*''.*'
Setting permissions for user "admin"in vhost "/"...[root@localhost ~]# 

7. Virtual host management

Why do I need a virtual host (vhost)? Because RabbitMQ can only control permissions at the granularity of the virtual host. Each vhost is essentially a mini version of RabbitMQ server, with its own queues, switches, and bindings.

7.1) View virtual host

[ root@localhost ~]# rabbitmqctl list_vhosts
Listing vhosts .../[root@localhost ~]# 

7.2) Add virtual host

rabbitmqctl add_vhost virtual host name

[ root@localhost ~]# rabbitmqctl add_vhost coreSystem
Adding vhost "coreSystem"...[root@localhost ~]# 

7.3) Delete virtual host

rabbitmqctl delete_vhost virtual host name

[ root@localhost ~]# rabbitmqctl delete_vhost coreSystem
Deleting vhost "coreSystem"...[root@localhost ~]#

8. web background management

8.1) Enable background management plugin

[ root@localhost ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been configured:
 rabbitmq_management
 rabbitmq_management_agent
 rabbitmq_web_dispatch
Applying plugin configuration to rabbit@localhost...
The following plugins have been enabled:
 rabbitmq_management
 rabbitmq_management_agent
 rabbitmq_web_dispatch

started 3 plugins.[root@localhost ~]# 

8.2) Login

Browser input: http://serverIp:15672/

Recommended Posts

CentOS online installation RabbitMQ3.7
CentOS online installation RabbitMQ3.7
2019-07-09 CentOS7 installation
centos7_1708 installation
Centos5 installation guide
Python - centos6 installation
Docker installation (CentOS7 installation)
centOs install rabbitMQ
CentOS7 docker installation
centos6.9 rabbitmq 3.6.8 upgrade 3.8.2
Zabbix 2.2.20 installation details (Centos6.9)
Centos6.9 build rabbitmq 3.6.8 cluster
Centos source installation Python3
Install RabbitMQ on CentOS 7
lamp (centos7) installation lamp environment
CentOS 7 deploys RabbitMQ service
Centos7 mqtt cluster installation
Graphical installation of CentOS8
Mysql8.0.15 installation configuration (centos7)
Linux notes (1): CentOS-7 installation
Redis3 installation under Centos7
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
Docker CentOS installation method
Install RabbitMQ on CentOS7
Linux CentOS 7 installation tutorial
Centos7 docker installation details
Discourse CentOS 8 new installation manual
Centos 7 mini installation process record
CentOs7.3 build RabbitMQ 3.6 stand-alone service
Install mysql online on centos
Centos mysql installation and configuration
CentOS7 install rabbitmq cluster (binary)
Glusterfs cluster installation on Centos7
Redis cluster installation under CentOS
Centos7 installation and configuration prometheus
CentOS 7 Galera Cluster installation guide
CentOS 7 installation and configuration PPTP
CentOS 6.x installation mysql5.7 record
CentOS installation and configuration cmake
Graphical centos installation detailed process
Centos7.5 installation and configuration MongoDB4.0.4
Redis cluster installation under CentOS
CentOS 7 installation and configuration PPTP
Hyper-V + CentOS7 installation video tutorial
centos7 kvm installation and use
Centos7 silent installation of Oracle11g
CentOS 6.8 virtual machine installation details
CentOS7 postgresql installation and use
CentOS environment installation of Docker
centos6.9 rabbitmq set up SSL
Centos7 installation tomcat process introduction
Centos7.4 environment installation lamp-php7.0 tutorial
Docker EE installation on centos7
Discourse CentOS 8 new installation manual
CentOS8 Linux 8.0.1905 installation process (illustration)
CentOS 6 automatically installs RabbitMQ script
Centos7 elk7.1.1 installation and use
Centos7 installation and configuration of Jenkins
Analysis of Hyper-V installation CentOS 8 problem
Centos iso image file installation tutorial