安装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即可以登录
相关推荐
_F_y3 小时前
仿RabbitMQ实现消息队列-项目设计
分布式·rabbitmq
小夏子_riotous4 小时前
Docker学习路径——9、Docker 网络深度解析:从默认网络到自定义网络实战
linux·运维·网络·docker·容器·centos·云计算
逆境不可逃5 小时前
一篇速通RabbitMQ (从入门到生产实战:核心原理、高级特性与 Spring Boot 集成全解)
开发语言·后端·ruby
idolao5 小时前
CentOS 7 安装 jprofiler_linux64_7_2_3.tar.gz 详细步骤(解压、配置、远程连接)
linux·python·centos
java1234_小锋6 小时前
RabbitMQ中有哪几种交换机类型?
分布式·rabbitmq
代码漫谈6 小时前
探索RabbitMQ集群:如何实现消息的高可用性和负载均衡
分布式·消息队列·rabbitmq·负载均衡
小周技术驿站1 天前
Linux 权限管理细节详解
linux·运维·服务器·ubuntu·centos
H_老邪1 天前
CentOS 9 解决 root 登录及重置密码指南
linux·运维·centos
诗句藏于尽头1 天前
CentOS 7 源码编译安装 Python 3.11 完整教程
linux·centos·python3.11
小夏子_riotous1 天前
Docker学习路径——8、Dockerfile
linux·运维·docker·容器·系统架构·centos·运维开发