centos上安装RabbitMQ
Posted lavezhang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos上安装RabbitMQ相关的知识,希望对你有一定的参考价值。
wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_64/esl-erlang_22.1-1_centos_7_amd64.rpm
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.4/rabbitmq-server-3.8.4-1.el7.noarch.rpm
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel
yum -y install epel-release
rpm -ivh esl-erlang_22.1-1_centos_7_amd64.rpm
erl -version
yum install socat
rpm -ivh rabbitmq-server-3.8.4-1.el7.noarch.rpm
启动
rabbitmq-server -detached
停止
rabbitmqctl stop
状态
rabbitmqctl status
开启web插件
rabbitmq-plugins enable rabbitmq_management
访问:http://127.0.0.1:15672/
默认账号密码:guest guest(这个账号只允许本机访问)
查看所有用户
rabbitmqctl list_users
添加一个用户
rabbitmqctl add_user admin 123456
配置权限
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
查看用户权限
rabbitmqctl list_user_permissions admin
设置tag
rabbitmqctl set_user_tags admin administrator
删除用户(安全起见,删除默认用户)
rabbitmqctl delete_user guest
以上是关于centos上安装RabbitMQ的主要内容,如果未能解决你的问题,请参考以下文章
RabbitMQRabbitMQ和Erlang下载与安装步骤—2023超详细最新版