CentOS7.2 安装RabbitMQ3.6.10
CentOS上面使用yum安装比较方便
先记录一些rabbitmq的基本操作命令:
$ sudo chkconfig rabbitmq-server on # 添加开机启动RabbitMQ服务
$ sudo /sbin/service rabbitmq-server start # 启动服务
$ sudo /sbin/service rabbitmq-server status # 查看服务状态
$ sudo /sbin/service rabbitmq-server stop # 停止服务 # 查看当前所有用户
$ sudo rabbitmqctl list_users # 查看默认guest用户的权限
$ sudo rabbitmqctl list_user_permissions guest # 由于RabbitMQ默认的账号用户名和密码都是guest。为了安全起见, 先删掉默认用户
$ sudo rabbitmqctl delete_user guest # 添加新用户
$ sudo rabbitmqctl add_user username password # 设置用户tag
$ sudo rabbitmqctl set_user_tags username administrator # 赋予用户默认vhost的全部操作权限
$ sudo rabbitmqctl set_permissions -p / username ".*" ".*" ".*" # 查看用户的权限
$ sudo rabbitmqctl list_user_permissions username
准备工作:
Centos自带yum,首先给yum换源,换成国内的阿里云
第一步:安装erlang
安装rpm仓库:
[hongdada@localhost ~]$ sudo rpm -Uvh http://ftp.riken.jp/Linux/fedora/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
安装erlang
[hongdada@localhost ~]$ yum install erlang
第二步:安装rabbitmq
先下载rpm
[hongdada@localhost ~]$ sudo wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el7.noarch.rpm
安装
[hongdada@localhost ~]$ sudo yum install rabbitmq-server-3.6.10-1.el7.noarch.rpm
安装完成后启动服务:
[hongdada@localhost ~]$ sudo yum install rabbitmq-server-3.6.10-1.el7.noarch.rpm
查看服务状态:
[hongdada@localhost ~]$ service rabbitmq-server status
详细信息:
[hongdada@localhost ~]$ sudo service rabbitmq-server status
[sudo] password for hongdada:
Redirecting to /bin/systemctl status rabbitmq-server.service
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)
Active: active (running) since 日 2017-07-23 22:10:39 CST; 4min 3s ago
Main PID: 34634 (beam.smp)
Status: "Initialized"
CGroup: /system.slice/rabbitmq-server.service
├─34634 /usr/lib64/erlang/erts-5.10.4/bin/beam.smp -W w -A 128 -P 1048576 -t 5000000 -stbt db -zdbbl 32000 -K true -- -root /...
├─34775 /usr/lib64/erlang/erts-5.10.4/bin/epmd -daemon
├─34977 inet_gethost 4
└─34978 inet_gethost 4 7月 23 22:10:38 localhost.localdomain rabbitmq-server[34634]: RabbitMQ 3.6.10. Copyright (C) 2007-2017 Pivotal Software, Inc.
7月 23 22:10:38 localhost.localdomain rabbitmq-server[34634]: ## ## Licensed under the MPL. See http://www.rabbitmq.com/
7月 23 22:10:38 localhost.localdomain rabbitmq-server[34634]: ## ##
7月 23 22:10:38 localhost.localdomain rabbitmq-server[34634]: ########## Logs: /var/log/rabbitmq/rabbit@localhost.log
7月 23 22:10:38 localhost.localdomain rabbitmq-server[34634]: ###### ## /var/log/rabbitmq/rabbit@localhost-sasl.log
7月 23 22:10:38 localhost.localdomain rabbitmq-server[34634]: ##########
7月 23 22:10:38 localhost.localdomain rabbitmq-server[34634]: Starting broker...
7月 23 22:10:39 localhost.localdomain rabbitmq-server[34634]: systemd unit for activation check: "rabbitmq-server.service"
7月 23 22:10:39 localhost.localdomain systemd[1]: Started RabbitMQ broker.
7月 23 22:10:39 localhost.localdomain rabbitmq-server[34634]: completed with 0 plugins.
查看对应的日志文件:
[hongdada@localhost ~]$ cd /var/log/rabbitmq/
[hongdada@localhost rabbitmq]$ ls
rabbit@localhost.log rabbit@localhost-sasl.log
[hongdada@localhost rabbitmq]$ vi rabbit@localhost.log
日志文件内容:
=INFO REPORT==== 23-Jul-2017::22:10:38 ===
Starting RabbitMQ 3.6.10 on Erlang R16B03-1
Copyright (C) 2007-2017 Pivotal Software, Inc.
Licensed under the MPL. See http://www.rabbitmq.com/ =INFO REPORT==== 23-Jul-2017::22:10:38 ===
node : rabbit@localhost
home dir : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/rabbitmq.config (not found)
cookie hash : uyKwm1mYlbUecxvrRAhaaQ==
log : /var/log/rabbitmq/rabbit@localhost.log
sasl log : /var/log/rabbitmq/rabbit@localhost-sasl.log
database dir : /var/lib/rabbitmq/mnesia/rabbit@localhost =INFO REPORT==== 23-Jul-2017::22:10:39 ===
Memory limit set to 1509MB of 3774MB total. =INFO REPORT==== 23-Jul-2017::22:10:39 ===
Enabling free disk space monitoring =INFO REPORT==== 23-Jul-2017::22:10:39 ===
Disk free limit set to 50MB
"rabbit@localhost.log" [只读] 75L, 2451C
发现/etc/rabbitmq/rabbitmq.config不存在
先创建用户:
[hongdada@localhost system]$ sudo chkconfig rabbitmq-server on
注意:正在将请求转发到“systemctl enable rabbitmq-server.service”。
Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
[hongdada@localhost system]$ sudo rabbitmqctl list_users
Listing users
guest [administrator]
[hongdada@localhost system]$ sudo rabbitmqctl add_user hongdada hongdada
Creating user "hongdada"
[hongdada@localhost system]$ sudo rabbitmqctl set_user_tags hongdada administrator
Setting tags for user "hongdada" to [administrator]
[hongdada@localhost system]$ sudo rabbitmqctl list_user_permissions hongdada
Listing permissions for user "hongdada"
[hongdada@localhost system]$ sudo rabbitmqctl set_permissions -p / hongdada ".*" ".*" ".*"
Setting permissions for user "hongdada" in vhost "/"
[hongdada@localhost system]$ sudo rabbitmqctl list_user_permissions hongdada
Listing permissions for user "hongdada"
/ .* .* .*
创建rabbitmq.config文件
[
{rabbit,
[%%
%% Network Connectivity
%% ====================
%%
%% By default, RabbitMQ will listen on all interfaces, using
%% the standard (reserved) AMQP port.
%%
{tcp_listeners, [5672]},
{loopback_users, ["hongda"]}
]}
].
最后启动Web管理器界面:(主要是找不到rabbitmq的安装位置了,可以用文件夹搜索)
hongdada@localhost rabbitmq_server-3.6.10]$ cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.10
[hongdada@localhost rabbitmq_server-3.6.10]$ ls
ebin include plugins sbin
[hongdada@localhost rabbitmq_server-3.6.10]$ sudo rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
amqp_client
cowlib
cowboy
rabbitmq_web_dispatch
rabbitmq_management_agent
rabbitmq_management Applying plugin configuration to rabbit@localhost... started 6 plugins.
在虚拟机端访问:

打开防火墙端口:15672
重启虚拟机,在主机端远程访问192.168.1.108:15672,ok了,不重启的话访问不了。
http://www.cnblogs.com/uptothesky/p/6094357.html
http://www.cnblogs.com/crazylqy/p/6567253.html
http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD
http://blog.csdn.net/weixin_35934768/article/details/52637273
CentOS7.2 安装RabbitMQ3.6.10的更多相关文章
- Linux CentOS7下安装Zookeeper-3.4.10服务(最新)
Linux CentOS7下安装Zookeeper-3.4.10服务(最新) 2017年10月27日 01:25:26 极速-蜗牛 阅读数:1933 版权声明:本文为博主原创文章,未经博主允许不得 ...
- (三)RabbitMQ消息队列-Centos7下安装RabbitMQ3.6.1
原文:(三)RabbitMQ消息队列-Centos7下安装RabbitMQ3.6.1 如果你看过前两章对RabbitMQ已经有了一定了解,现在已经摩拳擦掌,来吧动手吧! 用什么系统 本文使用的是Cen ...
- 安装RabbitMQ3.6.10报错:{error,{missing_dependencies,[crypto,ssl],
参考https://blog.csdn.net/u010739551/article/details/80848993 如果安装上篇博文安装则可避免这种情况 CentOS6.7安装RabbitMQ3. ...
- Centos7编译安装lnmp(nginx1.10 php7.0.2)
我使用的是阿里云的服务器 Centos7 64位的版本 1. 连接服务器 这个是Xshell5的版本 安装好之后我们开始连接服务器 2. 安装nginx 首先安装nginx的依赖 yum instal ...
- RabbitMQ消息队列(三)-Centos7下安装RabbitMQ3.6.1
如果你看过前两章对RabbitMQ已经有了一定了解,现在已经摩拳擦掌,来吧动手吧! 用什么系统 本文使用的是Centos7,为了保证对linux不太熟悉的伙伴也能轻松上手(避免折在安装的路上),下面是 ...
- CentOS7.0安装Nginx 1.10.0
首先由于nginx的一些模块依赖一些lib库,所以在安装nginx之前,必须先安装这些lib库,这些依赖库主要有g++.gcc.openssl-devel.pcre-devel和zlib-devel ...
- RabbitMQ基本概念(三)-Centos7下安装RabbitMQ3.6.1
如果你看过前两章对RabbitMQ已经有了一定了解,现在已经摩拳擦掌,来吧动手吧! 用什么系统 本文使用的是Centos7,为了保证对linux不太熟悉的伙伴也能轻松上手(避免折在安装的路上),下面是 ...
- Centos7下安装MongoDB4.0.10
前言 模式自由 :可以把不同结构的文档存储在同一个数据库里 面向集合的存储:适合存储 JSON风格文件的形式 完整的索引支持:对任何属性可索引 复制和高可用性:支持服务器之间的数据复制,支持主-从模式 ...
- Linux centOS7 下安装mysql5.7.10
1:下载二进制安装包 http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz 2:解压到 ...
随机推荐
- CSS- ie6,ie7,ie8 兼容性写法,CSS hack写法
css ie6,ie7,ie8 兼容性写法,CSS hack写法 margin-bottom:40px; /*ff的属性*/margin-bottom:140px\9; /* IE6 ...
- Mybatis——SQL语句构建器类
SQL语句构建器类 问题 Java程序员面对的最痛苦的事情之一就是在Java代码中嵌入SQL语句.这么来做通常是由于SQL语句需要动态来生成-否则可以将它们放到外部文件或者存储过程中.正如你已经看到的 ...
- 在android真机上使用sqlite3
#zijun#2013.10.29#QQ:223663737 在android真机上使用sqlite3 前期准备: 1:保证手机已经ROOT 操作步骤: 1 : 打开CMD 2 : 进入android ...
- poj3734 Blocks[矩阵优化dp or 组合数学]
Blocks Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6578 Accepted: 3171 Descriptio ...
- Python的函数名作为参数传入调用以及map、reduce、filter
零.python的lambda函数: #lambda function func = lambda x : x+1 #这里是一个匿名函数,x是参数,x+1是对参数的操作 func(1)= 2 多个参数 ...
- Flash 用FLASH遮罩效果做图片切换效果
本教程是关于FLASH应用遮罩效果制作好看的图片切换效果.该教程选用FLASH遮罩中最简单的一种作为例子,当然你可以用自己的想象力来做出更多更好的图片动画.希望本教程能带你带来帮助. 让我们先看看效果 ...
- Windows Phone 几种弹出框提示方式
首先,我们需要在网络上下载一个Coding4Fun 然后,引用 using Coding4Fun.Phone.Controls.Toolkit; using Codin ...
- Linux操作系统上ADSL拨号上网的方法详解
1.安装 yum install rp-pppoe.x86_64 2.配置PPPOE客户端软件 安装完软件包后,必须配置pppoe的配置文件/etc/ppp/pppoe.conf,从而让ADSL拨号时 ...
- backup与recover
完全恢复: 1.关闭DB2.拷贝文件3.启动DB.<出错>startup mount4.recover database until cancel using backup control ...
- matplotlib 散点图scatter
最近开始学习python编程,遇到scatter函数,感觉里面的参数不知道什么意思于是查资料,最后总结如下: 1.scatter函数原型 2.其中散点的形状参数marker如下: 3.其中颜色参数c如 ...