centos7下安装rabbitmq3.8
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash yum install rabbitmq-server-3.8.14 #以3.8.14版本为例
//2.启用管理后台 rabbitmq-plugins enable rabbitmq_management //3.启动rabbitmq systemctl start rabbitmq-server systemctl enable rabbitmq-server
//1. 创建用户 rabbitmqctl add_user admin admin123 //2.设置用户角色 #rabbit有固定几种角色,具体百度 rabbitmqctl set_user_tags admin administrator
//3.新增虚拟主机/
rabbitmqctl add_vhost /
//4.设置用户权限
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
//重启生效
systemctl restart rabbitmq-server