rabbitmq

Install Erlang

yum install erlang

or

  1. wget http://erlang.org/download/otp_src_19.0.tar.gz
  2. tar -zxvf otp_src_19.0.tar.gz
  3. cd otp_src_19.0
  4. ./configure --prefix=/opt/erlang --without-javac

报错

  1. configure: error: No curses library functions found
  2. configure: error: /bin/sh '/root/otp/erts/configure' failed for erts

解决

  1. yum -y install ncurses-devel
  2. ./configure --prefix=/opt/erlang --without-javac

报错

  1. odbc : ODBC library - link check failed
  2. orber : No C++ compiler found

解决

  1. yum list | grep ODBC
  2. yum install unixODBC-devel
  3. ./configure --prefix=/opt/erlang --without-javac

安装

make && make install

设置环境变量

  1. vi /etc/profile
  2. #set erlang environment
  3. export PATH=$PATH:/opt/erlang/bin
  4. source /etc/profile
  5. /opt/erlang/bin/erl

Install RabbitMQ Server

  1. wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5-1.noarch.rpm
  2. yum install rabbitmq-server-3.6.5-1.noarch.rpm

提示

  1. Requires: erlang >= R16B-03
  2. Installed: erlang-R14B-04.3.el6.x86_64 (@epel)
  3. erlang = R14B-04.3.el6

忽略erlang的版本问题

rpm -ivh --nodeps rabbitmq-server-3.6.5-1.noarch.rpm

Run RabbitMQ Server

启用管理插件

  1. cd /usr/lib/rabbitmq/bin/
  2. ./rabbitmq-plugins enable rabbitmq_management

运行

  1. chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
  2. service rabbitmq-server start

创建用户赋予权限

  1. rabbitmqctl add_user user pawwword
  2. rabbitmqctl set_user_tags user administrator
  3. rabbitmqctl set_permissions -p / user ".*" ".*" ".*"
来自为知笔记(Wiz)