安装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即可以登录
相关推荐
为什么不问问神奇的海螺呢丶4 小时前
n9e categraf rabbitmq监控配置
分布式·rabbitmq·ruby
予枫的编程笔记9 小时前
【Linux入门篇】Linux入门不踩坑:内核、发行版解析+环境搭建全流程
linux·ubuntu·centos·vmware·xshell·linux入门·linux环境搭建
艾莉丝努力练剑9 小时前
【Linux:文件】基础IO:文件操作的系统调用和库函数各个接口汇总及代码演示
linux·运维·服务器·c++·人工智能·centos·io
m0_6873998410 小时前
telnet localhost 15672 RabbitMQ “Connection refused“ 错误表示目标主机拒绝了连接请求。
分布式·rabbitmq
醇氧10 小时前
【Linux】centos 防火墙学习
linux·学习·centos
Ronin30510 小时前
日志打印和实用 Helper 工具
数据库·sqlite·rabbitmq·文件操作·uuid生成
❀͜͡傀儡师11 小时前
CentOS 7部署FTP服务
linux·运维·centos·ftp
swaveye906013 小时前
轻量服务器CentOS 7.9 64位 设置允许防火墙/HTTP/HTTPS访问
运维·服务器·centos
雨笋情缘1 天前
在 CentOS 7 系统中通过定时任务自动执行 Shell 脚本
centos·crontab
Web极客码1 天前
CentOS 7.x如何快速升级到CentOS 7.9
linux·运维·centos