【rabbitmq】Centos7 下安装rabbitmq
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的更多相关文章
- centos7下安装rabbitmq
RabbitMQ: RabbitMQ是流行的开源消息队列系统,是AMQP(Advanced Message Queuing Protocol高级消息队列协议)的标准实现,用erlang语言开发.Rab ...
- 学习笔记(3)centos7 下安装RabbitMQ
centos7 安装RabbitMQ 安装erlang 因为RabbitMQ由ERLANG实现,所以需要先安装erlang.可以从https://www.erlang-solutions.com/re ...
- Centos7 下安装 RabbitMQ
安装 erlang 1.下载erlang 官网地址 http://www.erlang.org/download 挑选合适的版本 然后 wget 比如目前最新版本 19.3 运行命令 wget htt ...
- CentOS7下安装rabbitmq消息队
安装如下步骤: 1.首先安装erlang yum install erlang 注:如果出现No package erlang available. rpm -Uvh http://download. ...
- 在Centos7下安装RabbitMQ
1.背景 不用多说,这东西好用! 2.安装 步骤一:下载安装包 链接:https://pan.baidu.com/s/1PIYI60wX6L7BtVyVft-vSA 提取码:1234 复制这段内容后打 ...
- (三)RabbitMQ消息队列-Centos7下安装RabbitMQ3.6.1
原文:(三)RabbitMQ消息队列-Centos7下安装RabbitMQ3.6.1 如果你看过前两章对RabbitMQ已经有了一定了解,现在已经摩拳擦掌,来吧动手吧! 用什么系统 本文使用的是Cen ...
- centos7环境安装rabbitMQ
使用专业的消息队列产品rabbitmq之centos7环境安装 http://www.cnblogs.com/huangxincheng/p/6006569.html [源码安装,适用GNOME + ...
- centos7.4安装rabbitmq服务(3.7.10版本)
一.需要安装erlang版本依赖,可以使用二进制安装方式,也可以通过rpm安装,但是安装的时候会提示需要erlang版本>=19.3,而且直接默认yum仓库中的版本较低.,为了节省时间,文章中直 ...
- [转]centos7环境安装rabbitMQ
使用专业的消息队列产品rabbitmq之centos7环境安装 http://www.cnblogs.com/huangxincheng/p/6006569.html CentOS7上安装Rabbit ...
随机推荐
- 漏洞复现——Apache SSI远程命令执行
漏洞原理:当目标服务器开启了SSI与CGI支持,我们就可以上传shtml文件,利用<!--#exec cmd="id" -->语法执行命令. SSI:SSI(服务器端包 ...
- grpc(二)记一次grpc debug--io.grpc.StatusRuntimeException: UNKNOWN
1.起初是dingding一直报错: instance:服务器名 err:GrpcClient#placeOrder: io.grpc.StatusRuntimeException: UNKNOWN ...
- mongoengine 分页 切片与 skip + limit 的区别
首先要了解切片与 skip 的原理 切片原理是将 index(索引) 或 cursor(游标)移动到 start 位置再 进行切分: skip原理是跳过start条数据后再获取 1. 单纯的普通分页用 ...
- EBS 请求输出Html报表集成Echarts
百度开源的ECharts有样式丰富且美观的报表类型可供选用,可以将其集成至EBS请求输出的Html报表中,这其实就是一个生成Html数据的过程. 定义输出类型为HTML的请求我就不在此处赘述. 我 ...
- 依赖注入原理---IoC框架
先来讲一讲,一个简单的依赖注入例子. 1. 依赖 如果在 Class A 中,有 Class B 的实例,则称 Class A 对 Class B 有一个依赖.例如下面类 Human 中用到一个 Fa ...
- dubbo 异步回调
dubbo 异步回调的使用 业务接口: public interface HelloService { String sayHello(); void sayHi(String name); } 回调 ...
- Python---遍历序列的各种方式
本文主要列举使用for循环遍历类似list结果的方式,因为老是使用for e in w_list真的是太没创意了,这显然不是我的风格,嘿嘿... 1. for item in s: 遍历s中的元素 2 ...
- bfs两种记录路径方法
#include<cstdio> #include<queue> using namespace std; struct sss { int x,y; }ans[][]; ][ ...
- Matlab_audiowrite_音频生成
输出音频文件所需函数为 audiowrite .通过例程进行解释: % 生成时间序列 fs = 5000; % [Hz] 信号采样频率 T = 1; % [s] 信号长度 x = 0:1/fs:T; ...
- 剑指Offer 36. 两个链表的第一个公共结点 (链表)
题目描述 输入两个链表,找出它们的第一个公共结点. 题目地址 https://www.nowcoder.com/practice/6ab1d9a29e88450685099d45c9e31e46?tp ...