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

相关推荐