/*添加源 */
echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list
/*新增公钥(不加会有警告)*/
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
/*更新源*/
sudo apt-get update
/*安装rabbitmq-server*/
sudo apt-get install rabbitmq-server
命令介绍:
1、查看rabbitmq运行状态
invoke-rc.d rabbitmq-server stop/start/etc
2、打开管理页面
sudo rabbitmq-plugins enable rabbitmq_management
3、查看安装的插件
sudo rabbitmqctl list_users
4、查看用户
sudo rabbitmqctl list_users
5、新增管用户
sudo rabbitmqctl add_user admin admin
6、分配管理员权限
sudo rabbitmqctl set_user_tags admin administrator