标签:
1、Linux安装RabbitMQ。
参考网址:RPM安装RabbitMQ 仔细阅读。
先安装erlang:
su -c ‘rpm -Uvh http://mirrors.neusoft.edu.cn/epel/epel-release-latest-7.noarch.rpm‘ ... su -c ‘yum install foo‘
####################################
建议使用这个安装erlang库
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
# 这里还有http://www.rabbitmq.com/releases/erlang/ erlang的各个版本下载,安装这个即可。
####################################
yum install erlang
下载rabbitmq 的rpm包并安装
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc yum install rabbitmq-server-3.6.2-1.noarch.rpm
安装时可能会报需要安装esl-erlang_16.b.3。这个可以到这里下载https://www.erlang-solutions.com/resources/download.html
2、开始编写rabbitmq代码,参照http://www.rabbitmq.com/getstarted.html
cp /usr/share/doc/rabbitmq-server-3.6.2/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config ,service rabbitmq-server restart
1)遇到的问题,报错:pika.exceptions.ProbableAuthenticationError,可以查看日志(重要):
tail -f /var/log/rabbitmq/rabbit\@Minion.log
=ERROR REPORT==== 27-Jun-2016::02:06:19 ===
Error on AMQP connection <0.542.0> (192.168.243.131:43681 -> 192.168.243.131:5672, state: starting):
PLAIN login refused: user ‘guest‘ can only connect via localhost
解决办法:修改配置文件:%% {loopback_users, [<<"guest">>]}, 为 {loopback_users, []} ,service rabbitmq restart,参考http://www.rabbitmq.com/configure.html
未完待续!!!
标签:
原文地址:http://www.cnblogs.com/owasp/p/5618923.html