RabbitMQ装置
首要装置Erlang环境
由于 RabbitMQ 需求 erlang 环境的⽀持,所以必须先装置 erlang 。
假如仅仅运用RabbitMQ,个人引荐运用RabbitMQ公司保护的erlang版别,该版别只保留了与RabbltMQ相关的功用,
centOS6与7版别的都有,还有erlang19x、20x、21x版别。下面是在centOS7上装置22x版别erlang。
vi /etc/yum.repos.d/rabbitmq-erlang.repo
# In /etc/yum.repos.d/rabbitmq-erlang.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
yum install erlang
#验证erlang是否装置成功
erl
装置RabbitMQ
vim /etc/yum.repos.d/rabbitMQ.repo
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/7/
gpgcheck=0
repo_gpgcheck=0
#导入签名
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
yum install rabbitmq-server
装备RabbitMQ开机发动
chkconfig rabbitmq-server on
敞开WEB可视化办理插件:
rabbitmq-plugins enable rabbitmq_management
#重启服务
systemctl restart rabbitmq-server.service
查验装置成果
# 在后台先增加⼀个⽤户/暗码对:
rabbitmqctl add_user aaaak z123123
rabbitmqctl set_user_tags aaaak administrator
然后登录⽹⻚即可: