安装RabbitMQ

安装RabbitMQ

下载需要的两个包
shell 复制代码
# 这直接就可以安装了,下面 '上传对应的rmp包' 操作
[root@rabbitmq-1 ~]# curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
[root@rabbitmq-1 ~]# yum install erlang-21.3.8.21-1.el7.x86_64
# rabbitmq的包暂时找不到
上传对应的rpm包

RabbitMQ使用Relang语言开发的,所以安装RabbitMQ也需要安装对应的开发语言

上面是需要的安装包

安装对应的rpm包
shell 复制代码
[root@localhost ~]# yum install -y erlang-21.3.8.21-1.el7.x86_64.rpm
[root@localhost ~]# yum install -y rabbitmq-server-3.7.10-1.el7.noarch.rpm 
启动
shell 复制代码
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl start rabbitmq-server
[root@localhost ~]# systemctl enable rabbitmq-server
启动方式二:
[root@localhost ~]# /sbin/service rabbitmq-server status  ---查看状态
[root@localhost ~]# /sbin/service rabbitmq-server start   ---启动
创建用户并且授权
shell 复制代码
[root@localhost ~]# rabbitmqctl add_user root 1
Adding user "root" ...
[root@localhost ~]# rabbitmqctl set_user_tags root administrator
Setting tags for user "root" to [administrator] ...
[root@localhost ~]# rabbitmqctl list_users
Listing users ...
user    tags
guest   [administrator]
root    [administrator]
[root@localhost ~]# rabbitmqctl set_permissions -p "/" root ".*" ".*" ".*"
Setting permissions for user "root" in vhost "/" ...
开启用户远程登录
shell 复制代码
[root@localhost ~]# cd /usr/share/doc/rabbitmq-server-3.7.10/
[root@localhost rabbitmq-server-3.7.10]# cp rabbitmq.config.example /etc/rabbitmq
[root@localhost rabbitmq-server-3.7.10]# cd /etc/rabbitmq/
[root@localhost rabbitmq]# ls
enabled_plugins  rabbitmq.config.example
[root@localhost rabbitmq]# mv rabbitmq.config.example  rabbitmq.config
[root@localhost rabbitmq]# vim rabbitmq.config 

修改下面配置文件的内容 第349行

shell 复制代码
# 开启rabbitmq的web访问界面:
[root@localhost ~]# rabbitmq-plugins enable rabbitmq_management
输入对应的ip即可以登录
相关推荐
竹之却19 小时前
CentOS 系列,防火墙相关指令
linux·运维·centos
oMcLin1 天前
如何在 SUSE Linux Enterprise Server 15 上通过配置 Nginx 与 PHP‑FPM 提升大流量电商平台的服务器响应能力
centos·去中心化·区块链
oMcLin1 天前
如何在CentOS 7.9上配置并优化高并发视频流平台,利用Nginx和RTMP模块确保低延迟流媒体传输?
linux·nginx·centos
论迹1 天前
【RabbitMQ】-- 七种工作模式
分布式·rabbitmq
oMcLin1 天前
如何在 CentOS 7.9 上部署基于区块链的数字资产交易平台,确保交易透明度与去中心化安全性
centos·去中心化·区块链
论迹1 天前
【RabbitMQ】-- 高级特性
数据库·redis·分布式·消息队列·rabbitmq
HABuo1 天前
【linux进程控制(一)】进程创建&退出-->fork&退出码详谈
linux·运维·服务器·c语言·c++·ubuntu·centos
xzl041 天前
Docker Overlay2 迁移至 CentOS Home 完整指南
docker·eureka·centos
我爱娃哈哈1 天前
SpringBoot + Canal + RabbitMQ:MySQL 数据变更实时同步到缓存与搜索系统
spring boot·rabbitmq·java-rabbitmq
利刃大大1 天前
【RabbitMQ】消息确认机制 && 持久化 && 发布确认机制
分布式·中间件·消息队列·rabbitmq·mq