不言不语

您现在的位置是: 首页 >  PHP

PHP

Linux下RabbitMQ安装

2022-06-05PHP
MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法。应用程序通过读写出入队列的消息(针对应用程序的数据)来通信,而无需专用连接来链接它们。RabbitMQ是一个在AMQP基础上完整的,可复用的企业消息系统。这样的话,进行了异步处理,而这种异步处理的方式大大的节省了服务器的请求响应时间,从而提高了系统的吞吐量。

RabbitMQ安装相关知识点

1、安装Erlang

1
2

[root@MQ ~]# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
[root@MQ ~]# yum install erlang

2、安装rabbitmq

1
2
3

[root@MQ ~]# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.1/rabbitmq-server-3.5.1-1.noarch.rpm
[root@MQ ~]# rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
[root@MQ ~]# yum install rabbitmq-server-3.5.1-1.noarch.rpm

3、启动rabbitmq

1

[root@MQ ~]# service rabbitmq-server start

4、rabbitmq-management plugin提供HTTP_API来管理和监控RabbitMQ Server,具体包含如下功能:

1

[root@MQ ~]# rabbitmq-plugins enable rabbitmq_management  #web访问地址:http://server-name:15672

5、登陆rabbitmq,failed
you need to create a user for any vhost on that system (here I use default vhost “/”)创建一个用户

1

[root@MQ ~]# rabbitmqctl add_user yourName yourPass

Set the permissions for that user for default vhost设置用户权限

1

[root@MQ ~]# rabbitmqctl set_permissions -p / yourName ".*" ".*" ".*"

Set the administrator tag for this user (to enable him access the management pluggin)设置超级管理员标签

1

[root@MQ ~]# rabbitmqctl set_user_tags yourName administrator


文章评论