CentOS 7安装配置Rabbit MQ

CentOS 7.6.1810 安装 Rabbit MQ v3.6.5

1、创建安装目录并进入

mkdir -p /usr/local/rabbitmq && cd /usr/local/rabbitmq/

2、下载rpm包

wget www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5-1.noarch.rpm
wget http://repo.iotti.biz/CentOS/7/x86_64/socat-1.7.3.2-5.el7.lux.x86_64.rpm
wget www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm

3、安装rpm包

rpm -ivh erlang-18.3-1.el7.centos.x86_64.rpm
rpm -ivh socat-1.7.3.2-5.el7.lux.x86_64.rpm

4、安装rabbitmq-server

yum install -y rabbitmq-server-3.6.5-1.noarch.rpm

5、修改rabbit.app文件

cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin/
vim rabbit.app
{loopback_users, [guest]}   # 在第42行delete "<<>>";

6、启动插件rabbitmq_management和rabbitmq-server

rabbitmq-plugins enable rabbitmq_management
rabbitmq-server start &

7、其它常用命令

rabbitmqctl status                            # 查看rabbitmq状态
rabbitmqctl add_user admin password                  # 创建用户并设置密码
rabbitmqctl set_permissions -p / admin                # 为账号授权
rabbitmqctl set_user_tags admin administrator              # 将账号添加到administor组
rabbitmqctl set_permissions -p / admin "admin.*" ".*" ".*"    # 为用户授权虚拟主机

8、安装插件

mv rabbitmq_delayed_message_exchange-20171215-3.6.x.ez /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/plugins
./rabbitmq-plugins enable --online rabbitmq_delayed_message_exchange             # 启动插件
./rabbitmq-plugins list                                         # 查看插件列表

---------------------------------------------------------------------------羞 涩 的 分 隔 符---------------------------------------------------------------------------

posted @ 2019-08-28 16:08  让未来到来  阅读(608)  评论(2编辑  收藏  举报