赞
踩
相关记录链接地址 :
主机名称 | ip地址 | 操作系统 | 角色 | 软件版本 | 备注 |
---|---|---|---|---|---|
tjdatarabbitmq-shqstst-10 | 10.122.151.8 | CentOS 7 | erlang, rabbitmq | erlang22.3 rabbitmq v3.8.7 |
这里安装的erlang是专用于rabbitmq的[the package strips off some Erlang modules and dependencies that are not essential for running RabbitMQ.]
仓库有2种选择,Package Cloud 和 Bintray。这里选择使用Bintray
vi /etc/yum.repos.d/rabbitmq.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/22/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1
[rabbitmq-server]
name=rabbitmq-server
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.8.x/el/7/
gpgcheck=0
repo_gpgcheck=0
enabled=1
yum install erlang -y
==============================================================================================
Package Arch Version
==============================================================================================
Installing:
erlang x86_64 22.3.4.10-1.el7
Updating for dependencies:
openssl x86_64 1:1.0.2k-16.el7_6.1
openssl-devel x86_64 1:1.0.2k-16.el7_6.1
openssl-libs x86_64 1:1.0.2k-16.el7_6.1
==============================================================================================
yum install rabbitmq-server socat -y
================================================================================================
Package Arch Version
================================================================================================
Installing:
socat x86_64 1.7.3.2-2.el7
rabbitmq-server noarch 3.8.7-1.el7
================================================================================================
systemctl start rabbitmq-server.service
systemctl enable rabbitmq-server.service
systemctl status rabbitmq-server.service
# 启用插件 rabbitmq-plugins enable rabbitmq_management rabbitmq_prometheus # 查看启用的插件 rabbitmq-plugins list .... 省略其他 [E*] rabbitmq_management 3.8.7 [e*] rabbitmq_management_agent 3.8.7 [E*] rabbitmq_prometheus 3.8.7 [e*] rabbitmq_web_dispatch 3.8.7 # 重启服务 systemctl restart rabbitmq-server.service netstat -pltn Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 3081/beam.smp tcp 0 0 0.0.0.0:15692 0.0.0.0:* LISTEN 3081/beam.smp # prometheus metrics tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 3211/epmd tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 3081/beam.smp tcp6 0 0 :::5672 :::* LISTEN 3081/beam.smp # 验证metrics API curl localhost:15692/metrics # 验证UI 浏览器访问 10.122.151.8:15672 (本地IP地址 10.122.151.8) 备注:当前版本guest/guest默认只支持localhost访问[User can only log in via localhost],如果需要可以修改默认配置
这里授予做大权限了,可以根据实际需要进行授权
rabbitmqctl add_user admin admin
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
浏览器访问,直接使用admin/admin登录
到这里,单机版本的rabbitmq-server就配置完成了。接下来配置3节点的集群[mirrors queue模式]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。