Rabbitmq 简明教程
RabbitMQ - Installation
RabbitMQ 构建于 Erlang 运行时,所以我们必须先下载 Erlang,然后再安装 RabbitMQ。确保你在使用管理员权限安装 Erlang 和 RabbitMQ。
RabbitMQ is built on Erlang runtime so before installing RabbitMQ, we need to download Erlang and install it. Make sure, you are using administrative priviledge to install Erlang and RabbitMQ.
Erlang
Erlang 是一门通用编程语言和运行时环境。你可以从其主页 Download Erlang/OTP. 下载 Erlang 的最新版本。我们正在 Windows 上安装 Erlang 并下载了适用于 Windows 的 Erlang/OTP 24.2.2 安装程序 - otp_win64_24.2.2.exe。
Erlang is a general-purpose programming language and runtime environment. You can download the latest version of Erlang from its home page − Download Erlang/OTP.. We are installing Erlang on Windows and downloaded Erlang/OTP 24.2.2 Installer - otp_win64_24.2.2.exe for windows.
现在,双击安装程序并按照默认选择安装 Erlang,然后完成设置。
Now install the Erlang using the installer by double clicking on it and follow the default selections and finish the setup.
RabbitMQ Installation
从其 official downloads page 下载 RabbitMQ 最新二进制文件。我们下载了 windows 版的 3.9.13 作为 rabbitmq-server-3.9.13.exe。
Download the RabbitMQ Latest binary from its official downloads page We’ve downloaded 3.9.13 as rabbitmq-server-3.9.13.exe for windows.
现在,双击安装程序并按照默认选择安装 RabbitMQ,然后完成设置。
Now install the RabbitMQ using the installer by double clicking on it and follow the default selections and finish the setup.
默认情况下,RabbitMQ 作为 Windows 服务运行。若要启用基于 Web 的管理 UI,你需要执行以下步骤。
By default, RabbitMQ works as windows service. To enable Web based Administration UI, following step are needed.
转到 RabbitMQ 安装目录并按如下所示键入命令 −
Go to RabbitMQ Installation directory and type the commands as shown below −
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.9.13\sbin>rabbitmq-plugins.bat enable rabbitmq_management
Enabling plugins on node rabbit@DESKTOP-86KD9FC:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@DESKTOP-86KD9FC...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.9.13\sbin>rabbitmq-plugins enable rabbitmq_shovel rabbitmq_shovel_management
Enabling plugins on node rabbit@DESKTOP-86KD9FC:
rabbitmq_shovel
rabbitmq_shovel_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_shovel
rabbitmq_shovel_management
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@DESKTOP-86KD9FC...
The following plugins have been enabled:
rabbitmq_shovel
rabbitmq_shovel_management
started 2 plugins.
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.9.13\sbin>
使用管理员权限编辑 C:\Windows\System32\drivers\etc\hosts 文件,并向其中添加以下行 −
Edit C:\Windows\System32\drivers\etc\hosts file using administrative priviledge and add following line to it −
127.0.0.1 rabbitmq
Verify the Installation
现在打开 http://rabbitmq:15672/ 以打开管理控制台。使用 Guest/Guest 登录。
Now open http://rabbitmq:15672/ to open Management console. Login using guest/guest.