推荐大家看看这篇文章:https://blog.csdn.net/qq_27669839/article/details/113418827

下载安装文件

在网上去下载rabbmitmq-3.8.11,同时还需要下载erlang的依赖包,推荐下载地址

https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.11

https://github.com/rabbitmq/erlang-rpm/releases

https://centos.pkgs.org/7/lux/socat-1.7.3.2-5.el7.lux.x86_64.rpm.html

开始安装文件

启动rabbitmq

systemctl enable rabbitmq-server
systemctl start rabbitmq-server
systemctl status rabbitmq-server

Web插件安装

rabbitmq-plugins enable rabbitmq_management

开启15672端口

-- 第1种方式
-- 添加端口
-- permanent 代表永久添加
firewall-cmd --zone=public --add-port=15672/tcp --permanent

-- 重启防火墙
firewall-cmd --reload
-- 第2种方式:
systemctl stop fiewalld
systemctl disable firewalld

访问Rabbitmq的浏览器端

http://IP:15672

账号和密码 guest

提示当前只能本地访问,需要配置远程用户才能远程访问

配置远程用户

[root@localhost~]# vim /etc/rabbitmq/rabbitmq.config 
[{rabbit, [{loopback_users, []}]}].
[root@localhost~]#

重启Rabbitmq

[root@localhost~]# systemctl restart rabbitmq-server

创建管理用户

#添加用户(用户admin,密码admin)
[root@localhost~]# rabbitmqctl add_user admin admin
Adding user "admin" ... #设置用户角色(admin为管理员)
[root@locahost~]# rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] ... #设置用户权限(接受来自所有Host的所有操作)
[root@localhost~]# rabbitmqctl set_permissions -p "/" admin '.*' '.*' '.*'
Setting permissions for user "admin" in vhost "/" ... #查看用户权限
[root@localhost~]# rabbitmqctl list_user_permissions admin
Listing permissions for user "admin" ...
vhost configure write read
/ .* .* .*
[root@iZbp1jaz33icbt3708j6yyZ ~]#

RabbitMQ常用命令

# 添加用户
rabbitmqctl add_user <username> <password> # 删除用户
rabbitmqctl delete_user <username> # 修改用户密码
rabbitmqctl change_password <username> <newpassword> # 清除用户密码(该用户将不能使用密码登陆,但是可以通过SASL登陆如果配置了SASL认证)
rabbitmqctl clear_password <username> # 设置用户tags(相当于角色,包含administrator,monitoring,policymaker,management)
rabbitmqctl set_user_tags <username> <tag> # 列出所有用户
rabbitmqctl list_users # 创建一个vhosts
rabbitmqctl add_vhost <vhostpath> # 删除一个vhosts
rabbitmqctl delete_vhost <vhostpath> # 列出vhosts
rabbitmqctl list_vhosts [<vhostinfoitem> ...] # 针对一个vhosts给用户赋予相关权限;
rabbitmqctl set_permissions [-p <vhostpath>] <user> <conf> <write> <read> # 清除一个用户对vhosts的权限;
rabbitmqctl clear_permissions [-p <vhostpath>] <username> # 列出哪些用户可以访问该vhosts;
rabbitmqctl list_permissions [-p <vhostpath>] # 列出用户访问权限;
rabbitmqctl list_user_permissions <username>

最新文章

  1. 跨平台运行 Rafy 首次部署记录
  2. 1. Django系列之Django与ajax上传文件
  3. Python——functools
  4. 系统在某些情况下会自动调节UIScrollView的contentInset
  5. 华硕飞行堡垒zx50安装Ubunutu折腾记
  6. html frames
  7. 简单bat语法
  8. spm_预处理实验记录
  9. Delphi调用WINAPI时到底应该是指针还是结构体(注意是Delphi变量本身就是指针)
  10. HDFS配置文件内容解释
  11. 四、Linux/UNIX操作命令积累【chmod、chown、tail】
  12. 七 APPIUM Android 定位方式
  13. 从备份文件bak中识别SQL Server的版本
  14. [ovs][libvirt][virtio][qemu] vhost user client 排障
  15. [PC]PHPCMS v9.5.6整合UEditer1.4.2
  16. python给邮箱发送消息
  17. Python2.7-hashlib
  18. DPDK硬件盒子的初步安装测试
  19. 洛谷 P2951 [USACO09OPEN]捉迷藏Hide and Seek
  20. 聊一聊 Flex 中的 flex-grow、flex-shrink、flex-basis

热门文章

  1. Torchvision模型微调
  2. Linux 2 的 Windows 子系统上发布 CUDA
  3. 理解 this
  4. Java日期时间API系列39-----中文语句中的时间语义识别(time NLP 输入一句话,能识别出话里的时间)原理分析
  5. Spring4
  6. 「模拟8.18」字符串(卡特兰数)&#183;乌鸦喝水(树状数组,二分)&#183;所驼门王的宝藏(tarjan,拓扑)
  7. noip模拟9[斐波那契&#183;数颜色&#183;分组](洛谷模拟测试)
  8. ClickHouse学习系列之五【系统库system说明】
  9. Etcd中linearizable read实现
  10. 看完互联网大佬的「LeetCode 刷题手册」, 手撕了 400 道 Leetcode 算法题