centos7 安裝rabbitmq

centos7 install rabbitmq

install

wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.2/rabbitmq-server-3.7.2-1.el7.noarch.rpm
rpm --import https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc

# In /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/20/el/6
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1

yum install rabbitmq-server-3.7.2-1.el7.noarch.rpm

开机启动

systemctl enable rabbitmq-server
systemctl start rabbitmq-server

创建新账户

rabbitmqctl add_user zhangsan 123456
rabbitmqctl set_user_tags zhangsan administrator
rabbitmqctl set_permissions -p / zhangsan ".*" ".*" ".*"

添加web管理插件

rabbitmq-plugins enable rabbitmq_management

WEB访问

http://site:15672

删除持久化队列和数据

rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app