附录:Rabbitmq

升级

当前版本:3.4.2 升级到最新版 3.6.14

Ubuntu 14.x

sudo rabbitmqctl stop  

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

sudo apt-get install rabbitmq-server 

sudo rabbitmq-server start

php 包更新

https://packagist.org/packages/php-amqplib/php-amqplib

https://packagist.org/packages/alchemy/rabbitmq-management-client

sudo composer require alchemy/rabbitmq-management-client
sudo composer require php-amqplib/php-amqplib

问题1:

删除一些失效的源:cd /etc/apt/sources.list.d/

问题2:

外网无法访问:rabbitmq(配置具体的用户可以参考下面的资料),并重新启动

sudo chmod 777 /etc/rabbitmq/ -R

echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config

sudo service rabbitmq-server stop

sudo service rabbitmq-server start

注意:

登录管理页面地址端口从55672 变为 15672

http://127.0.0.1:15672

其他:

打开管理页面

sudo rabbitmq-plugins enable rabbitmq_management

查看安装的插件

sudo rabbitmq-plugins list

查看用户

sudo rabbitmqctl list_users

新增管理员用户

sudo rabbitmqctl add_user admin admin
sudo rabbitmqctl set_user_tags admin administrator

参考资料:

RabbitMQ常用命令

RabbitMQ由3.1.5升级3.6.10后远程访问失败

Installing on Debian / Ubuntu

RabbitMQ在Ubuntu 16.04下的安装与配置

sudo apt-get update错误

rabbitmq问题之HTTP access denied: user 'guest' - User can only log in via localhost

Last updated