CentOS7下源码包方式安装rabbitmq

1.先安装erlang http://www.cnblogs.com/justphp/p/6093880.html
2.下载rabbitmq rpm包:
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-3.5.0-1.noarch.rpm
3.安装rabbitmq
rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
rpm -ivh rabbitmq-server-3.5.0-1.noarch.rpm
4.启动rabbitmq服务
service rabbitmq-server restart

 

查看状态 rabbitmqctl status 可能报错:
  • Error: unable to connect to node rabbit@localhost: nodedown
  • rabbit@localhost:
  • connected to epmd (port 4369) on localhost
  • epmd reports: node 'rabbit' not running at all no other nodes on localhost
  • suggestion: start the node
解决办法:
rabbitmq-server remove
rabbitmq-server install

 

启动失败 service rabbitmq-server start 报错
  • 11月 25 23:06:58 localhost.localdomain systemd[1]: rabbitmq-server.service: control process exited, code=exited status=1
  • 11月 25 23:06:58 localhost.localdomain systemd[1]: Failed to start LSB: Enable AMQP service provided by RabbitMQ broker.
  • 11月 25 23:06:58 localhost.localdomain systemd[1]: Unit rabbitmq-server.service entered failed state.
  • 11月 25 23:06:58 localhost.localdomain systemd[1]: rabbitmq-server.service failed.
解决办法:
ps -aux|grep rabbitmq   //杀掉除grep外的pid

 

使用 rabbitmq 可能报错
  • Event: {error,<0.164.0>,
  • {<0.704.0>,"closing AMQP connection ~p (~s):~n~p~n",
  • [<0.704.0>,"192.168.38.1:64643 -> 192.168.38.129:5672",
  • {handshake_error,starting,0,
  • {amqp_error,access_refused,
  • "AMQPLAIN login refused: user 'test' - invalid - - credentials",
  • 'connection.start_ok'}}]}}

-Error: function_clause

解决办法
test用户没有权限。
rabbitmqctl  set_permissions -p /  test '.*' '.*' '.*'
posted @ 2016-11-25 15:20  justphp  阅读(3131)  评论(0编辑  收藏  举报