- RabbitMQ - 0 - Introduction, linux and windows installed

I. INTRODUCTION

rabbitMQ erlang is based on language development, in order to use rabbitMQ need to install erlang environment.

. 1, RabbitMQ queue is a message server and a proxy Century, used to share data between disparate applications through a common protocol, the use of Erlang is RabbitMQ written language, and is based RabbitMQ AMQP protocol.

2, RabbitMQ Features:
Most Internet use. Underlying the use of Erlang language, open source, outstanding performance and stability. Seamless integration with springAMQP, api rich. Rich cluster model, the expression configuration, HA mode, mirror mode queue. To ensure that data is not lost on the premise to achieve high reliability and availability.

3, AMQP protocol model

Download
erlang Download
RabbitMQ official website

Note that version with the specific view rabbitmq official website

Two, windows and install erlang rabbitMQ

1, erlang install

All the way to the default;
add environment configuration PATH, add the root directory bin
cmd input erl determine whether the installation is successful
successful page

2, RabbitMQ installation

The default way to
start the CMD as administrator mode
installation path

"C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin\rabbitmq-plugins.bat" enable rabbitmq_managemen

Restart RabbitMQ

net stop RabbitMQ && net start RabbitMQ

Access: http://127.0.0.1:15672
account: guest Password: guest

Three, Linux and install erlang RabbitMQ

1, erlang install

1, Erlang package wget to download or upload
installation

# cd /tmp
# mkdir -p /usr/local/erlang
# tar -xzvf otp_src_20.1.tar.gz
# cd otp_src_20.1
# ./configure --prefix=/usr/local/erlang --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac
# make -j8
# make install

Erlang environment variable settings

# vim /etc/profile
在末尾加入以下内容:
# set erlang environment
export PATH=$PATH:/usr/local/erlang/bin

--------------------------------
使环境变量生效
# source /etc/profile
测试
# erl

Successful installation page

2, RibbitMQ installation

# tar xvf rabbitmq-server-generic-unix-3.6.15.tar.xz
# mv rabbitmq_server-3.6.15 /usr/local/RabbitMQ

Environment variable settings

# vim /etc/profile
在末尾加入以下内容:
# set RabbitMQ environment
export PAHT=$PATH:/usr/local/RabbitMQ/sbin

# source /etc/profile

3, start the web management plug

# cd /usr/local/RabbitMQ/sbin
查看插件列表
# ./rabbitmq-plugins list
#开启可视化,必须
# ./rabbitmq-plugins enable rabbitmq_management
后台运行
# ./rabbitmq-server -detached

需要用浏览器访问,必须安装可视化。即 ./rabbitmq-plugins enable rabbitmq_management

开启防火墙端口5672 和 15672

监听端口5672 查看端口是否启用

# netstat -tnlp|grep 5672

最后我们就可以在浏览器上输入
http://ip:15672/登录管理界面 登录账号密码guest,guest
远程登录问题

低端的解决方法

# vi /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.7/ebin/rabbit.app

将:{loopback_users, [<<”guest”>>]}, 
改为:{loopback_users, []}, 
原因:rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问

高端的解决方法

添加用户

./rabbitmqctl add_user admin 123456

查看用户列表

./rabbitmqctl list_users

设置权限

rabbitmqctl  set_user_tags  admin  administrator

更多rabbitmqctl命令

Guess you like

Origin www.cnblogs.com/hjh614/p/11373254.html