CentOS 7 安装Rabbitmq

第一步也是往往最重要的一步:下载安装包!

Rabbitmq地址:https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.7.5

Erlang地址:https://github.com/rabbitmq/erlang-rpm/releases

特殊说明:

Install Erlang

Before installing RabbitMQ, you must install a supported version of Erlang/OTP. We strongly recommend using a packaged version. There are three commonly used sources for Erlang packages. We recommend using one of them.

  • We produce a package stripped down to only provide those components needed to run RabbitMQ. It might be easiest to use if installing Erlang's dependencies is proving difficult.
  • Erlang Solutions produces packages that are usually up to date. They produce two sets of packages: ones which are split up and are more convenient to use if you can add a yum repository, and a monolithic package which might be easier if you have to download manually.
  • EPEL ("Extra Packages for Enterprise Linux"); part of the Red Hat / Fedora organisation, provides many additional packages, including Erlang. These are the most official packages, and are split into many small packages, but are not always up to date.

将下载好的安装文件(此处注意erlang的rpm包必须从rabbitmq官网提供的github地址下载)

erlang-20.3.4-1.el7.centos.x86_64.rpm和rabbitmq-server-3.7.5-1.el7.noarch.rpm上传到要安装rabbitmq的服务器根目录下:

使用命令 yum install erlang-20.3.4-1.el7.centos.x86_64.rpm进行erlang安装,这样会自行解决依赖问题。(yum源配置方法在本文不再赘述)

Erlang包安装结束后,使用命令 :

yum install rabbitmq-server-3.7.5-1.el7.noarch.rpm安装rabbitmq包。

等待安装完毕

执行命令servicerabbitmq-server start启动rabbitmq

执行命令rabbitmq-pluginsenable rabbitmq_management以启用WEB管理功能。

 

执行以下命令添加一个用于WEB管理的用户。

 

rabbitmqctl add_user admin admin

rabbitmqctl set_permissions -p/  admin '.*' '.*' '.*'

rabbitmqctl set_user_tags admin administrator

2.启动

常用命令:

service rabbitmq-server start

 

service rabbitmq-server restart

service rabbitmq-server stop

2.配置

http:// {your host}:15672/

账号:admin

密码:admin

 

添加用户:

 

Username:xxx

Password: xxx

 设置用户权限:

Host调整:

{your host} rabbitmq.xxx.com

猜你喜欢

转载自www.cnblogs.com/alan319/p/9299543.html