linux環境下RabbitMQ-3.6.6安裝
1、安裝erlang
下載rpm倉庫:wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
安裝rpm倉庫
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
安裝erlang
yum -y install erlang
安裝完成後,執行:
[plain] view plain copy print?- [[email protected] opt]# erl -v
-
Erlang/OTP 19 [erts-8.1] [source-77fb4f8] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
- Eshell V8.1 (abort with ^G)
- 1>
2.安裝RabbitMQ
下載RabbitMQ的rpm:wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el6.noarch.rpm
yum -y install rabbitmq-server-3.6.6-1.el6.noarch.rpm
注:
如果報:Requires: socat
更新源wget –no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo -O /etc/yum.repos.d/convirt.repo
yum install socat
啟動服務:rabbitmq-server start
3.安裝外掛
啟動web管理介面
rabbitmq-plugins enable rabbitmq-management
增加訪問使用者,預設使用者guest只能本地訪問。
rabbitmqctl add_user admin 123456
設定角色:
rabbitmqctl set_user_tags admin administrator
設定預設vhost(“/”)訪問許可權
rabbitmqctl set_permissions -p “/” admin “.” “.” “.*”
使用者名稱admin,密碼123456進行登入