CentOS7 YUM系统部署RabbitMQ

一、安装Erlang

rpm -Uvh https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm

yum -y install erlang

检查是否安装好:

[root@localhost /]# erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

二、安装RabbitMQ
(1)下载安装包,可以去官网看下最新包https://github.com/rabbitmq/rabbitmq-server/tags

wget https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_15/rabbitmq-server-3.6.15-1.el7.noarch.rpm

(2)安装

rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum install -y rabbitmq-server-3.6.15-1.el7.noarch.rpm

三、启动RabbitMQ

systemctl start rabbitmq-server.service

systemctl enable rabbitmq-server.service

chkconfig rabbitmq-server on

/sbin/service rabbitmq-server start

# 启用web管理插件
rabbitmq-plugins enable rabbitmq_management

四、打开对应端口

firewall-cmd --permanent --zone=public --add-port=5672/tcp
firewall-cmd --permanent --zone=public --add-port=15672/tcp
firewall-cmd --reload
firewall-cmd --list-ports

五、增加用户

rabbitmqctl add_user admin admin123
rabbitmqctl set_user_tags admin administrator
# 修改密码
rabbitmqctl change_password admin admin12345

六、安装pika

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install pika


» 本文链接:https://blog.apires.cn/archives/491.html
» 转载请注明来源:Java地带  » 《CentOS7 YUM系统部署RabbitMQ》

» 本文章为Java地带整理创作,欢迎转载!转载请注明本文地址,谢谢!
» 部分内容收集整理自网络,如有侵权请联系我删除!

» 订阅本站:https://blog.apires.cn/feed/

标签: Java, RabbitMQ

添加新评论