rabbitmq安装

rabbitmq的安装依赖erlang,首先应该先安装erlang,然后安装rabbitmq;

Step1:安装erlang

erlang-rpm安装教程

选择在Centos7 上安装:

To use Erlang 20.x on CentOS 7:

# In /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/20/el/7
gpgcheck=1
gpgkey=https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1

然后执行:

yum install erlang

Step2: 安装rabbitmq

参考链接

下载rpm

wget https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_12/rabbitmq-server-3.6.12-1.el7.noarch.rpm

安装rpm

rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum install rabbitmq-server-3.6.12-1.el7.noarch.rpm

Step3: 设置开机自启动+开启服务

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

Step4: Rabbit管理(非必须)

开启Web管理插件

rabbitmq-plugins enable rabbitmq_management

output:
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@PC-201602152056... started 6 plugins.

浏览器访问:

http://localhost:15672

默认用户名和密码: guest/guest;

需要注意的是:guest用户仅仅提供localhost作为ip登录;

如果远程登录,如:http://192.168.35.129:15672/, 则会提示错误,登录不了:

# 如下是日志输出
=WARNING REPORT==== 21-Oct-2017::23:31:33 ===
HTTP access denied: user 'guest' - User can only log in via localhost

访问控制可参考:

Access Control (Authentication, Authorisation) in RabbitMQ

为了让guest可远程访问,需要修改rabbitmq.config中的loopback_users参数,设置为

[{rabbit, [{loopback_users, []}]}].

官网文档描述如下,可参考官方文档:RabbitMQ Configuration

loopback_users参数:
List of users which are only permitted to connect to the broker via a loopback interface (i.e. localhost).
If you wish to allow the default guest user to connect remotely, you need to change this to []. Default: [<<"guest">>]

默认安装时,rabbitmq.config配置文件可能不存在,有两种方式可以设置配置文件;

  • 方式1: 配置文件默认路径: /etc/rabbitmq/rabbitmq.config
  • 方式2: 使用环境变量RABBITMQ_CONFIG_FILE指定 rabbitmq.config文件位置;

    说明如下:
If rabbitmq.config doesn't exist, it can be created manually. Set the RABBITMQ_CONFIG_FILE environment variable if you change the location. The Erlang runtime automatically appends the .config extension to the value of this variable.

修改完配置文件后,重启,就可以使用guest用户远程访问了;

参考

erlang-rpm

CentOS 7 安裝 RabbitMQ 3.6.12

CentOS7安装rabbitMQ

【rabbitmq】Centos7 下安装rabbitmq的更多相关文章

  1. centos7下安装rabbitmq

    RabbitMQ: RabbitMQ是流行的开源消息队列系统,是AMQP(Advanced Message Queuing Protocol高级消息队列协议)的标准实现,用erlang语言开发.Rab ...

  2. 学习笔记(3)centos7 下安装RabbitMQ

    centos7 安装RabbitMQ 安装erlang 因为RabbitMQ由ERLANG实现,所以需要先安装erlang.可以从https://www.erlang-solutions.com/re ...

  3. Centos7 下安装 RabbitMQ

    安装 erlang 1.下载erlang 官网地址 http://www.erlang.org/download 挑选合适的版本 然后 wget 比如目前最新版本 19.3 运行命令 wget htt ...

  4. CentOS7下安装rabbitmq消息队

    安装如下步骤: 1.首先安装erlang yum install erlang 注:如果出现No package erlang available. rpm -Uvh http://download. ...

  5. 在Centos7下安装RabbitMQ

    1.背景 不用多说,这东西好用! 2.安装 步骤一:下载安装包 链接:https://pan.baidu.com/s/1PIYI60wX6L7BtVyVft-vSA 提取码:1234 复制这段内容后打 ...

  6. (三)RabbitMQ消息队列-Centos7下安装RabbitMQ3.6.1

    原文:(三)RabbitMQ消息队列-Centos7下安装RabbitMQ3.6.1 如果你看过前两章对RabbitMQ已经有了一定了解,现在已经摩拳擦掌,来吧动手吧! 用什么系统 本文使用的是Cen ...

  7. centos7环境安装rabbitMQ

    使用专业的消息队列产品rabbitmq之centos7环境安装 http://www.cnblogs.com/huangxincheng/p/6006569.html [源码安装,适用GNOME + ...

  8. centos7.4安装rabbitmq服务(3.7.10版本)

    一.需要安装erlang版本依赖,可以使用二进制安装方式,也可以通过rpm安装,但是安装的时候会提示需要erlang版本>=19.3,而且直接默认yum仓库中的版本较低.,为了节省时间,文章中直 ...

  9. [转]centos7环境安装rabbitMQ

    使用专业的消息队列产品rabbitmq之centos7环境安装 http://www.cnblogs.com/huangxincheng/p/6006569.html CentOS7上安装Rabbit ...

随机推荐

  1. 通过cookie记录,设置页面访问的跳转页

    通过cookie记录,设置页面访问的跳转页 转载自:http://blog.csdn.net/yixiao_naihe/article/details/26679515. 目的: 1.访问fm.htm ...

  2. 为iframe添加onclick事件

    如果页面上有iframe时,鼠标点击在iframe内时,包含iframe的document是不响应任何事件的, 例如: $("#iframe1").click(function() ...

  3. Pyhon中运算符的使用

    1. a & b python中的&延续了C/C++的含义,表示位运算. 例如 3 & 4:3&5:6&7 3 & 4 = (011)2 & ( ...

  4. 主机连接虚拟机的mysql 记录

    检查远程的虚拟机是否可以ping通过 查看虚拟机IP为192.168.38.128 cmd窗口ping 192.168.38.128,出现如下界面说明是可以的 检查虚拟机mysql的端口号是否对外开通 ...

  5. Docker(一) 安装Docker

    1.在 Ubuntu上 安装 docker $ sudo apt-get install curl $ curl -fsSL get.docker.com -o get-docker.sh $ sud ...

  6. Python---遍历序列的各种方式

    本文主要列举使用for循环遍历类似list结果的方式,因为老是使用for e in w_list真的是太没创意了,这显然不是我的风格,嘿嘿... 1. for item in s: 遍历s中的元素 2 ...

  7. <转载> 从算法上解读自动驾驶是如何实现的?

     科技新闻小鹏汽车2016-03-28 10:42 [摘要]车辆路径规划问题中路网模型.路径规划算法和交通信息的智能预测为关键点. 由于驾驶员的驾驶工作繁重,同时随着汽车拥有量的增加,非职业驾驶员的数 ...

  8. elastic search 常用查询

    1.查询mapping curl -X GET "10.0.38.111:1200/metric_data_bus_2018-08-07/_mapping/data_bus?pretty&q ...

  9. Travel notes in Vietnam

    I‘m  back:)  For preparing IELTS exam, I haven't written article for over 70 days. It's a good exper ...

  10. idea2018+maven+web新手maven指南

    CSDN上的博主详细的很 https://blog.csdn.net/hncu1306602liuqiang/article/details/82356097