Centos7下的rabbitmq-server-3.8.11安装配置
2024-10-10 09:28:20
推荐大家看看这篇文章: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>
最新文章
- 跨平台运行 Rafy 首次部署记录
- 1. Django系列之Django与ajax上传文件
- Python——functools
- 系统在某些情况下会自动调节UIScrollView的contentInset
- 华硕飞行堡垒zx50安装Ubunutu折腾记
- html frames
- 简单bat语法
- spm_预处理实验记录
- Delphi调用WINAPI时到底应该是指针还是结构体(注意是Delphi变量本身就是指针)
- HDFS配置文件内容解释
- 四、Linux/UNIX操作命令积累【chmod、chown、tail】
- 七 APPIUM Android 定位方式
- 从备份文件bak中识别SQL Server的版本
- [ovs][libvirt][virtio][qemu] vhost user client 排障
- [PC]PHPCMS v9.5.6整合UEditer1.4.2
- python给邮箱发送消息
- Python2.7-hashlib
- DPDK硬件盒子的初步安装测试
- 洛谷 P2951 [USACO09OPEN]捉迷藏Hide and Seek
- 聊一聊 Flex 中的 flex-grow、flex-shrink、flex-basis
热门文章
- Torchvision模型微调
- Linux 2 的 Windows 子系统上发布 CUDA
- 理解 this
- Java日期时间API系列39-----中文语句中的时间语义识别(time NLP 输入一句话,能识别出话里的时间)原理分析
- Spring4
- 「模拟8.18」字符串(卡特兰数)&#183;乌鸦喝水(树状数组,二分)&#183;所驼门王的宝藏(tarjan,拓扑)
- noip模拟9[斐波那契&#183;数颜色&#183;分组](洛谷模拟测试)
- ClickHouse学习系列之五【系统库system说明】
- Etcd中linearizable read实现
- 看完互联网大佬的「LeetCode 刷题手册」, 手撕了 400 道 Leetcode 算法题