Centos7搭建rabbmq
Centos7搭建rabbmq
l 安装
1,增加yum源
Erlang源
[root@localhost yum.repos.d]# cat erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/22/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1
rabbitmq源
[root@localhost yum.repos.d]# cat rabbmq.repo
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/7/
gpgcheck=0
repo_gpgcheck=0
enabled=1
2,清理yum缓存
yum clean all
3,建立元数据
yum makecache
4,安装rabbmq
yum install rabbitmq-server
l 启动
1,将rabbitmq加入到系统服务
chkconfig rabbitmq-server on
2,启动rabbitmq
/sbin/service rabbitmq-server start
3,关闭rabbitmq
/sbin/service rabbitmq-server stop
4,启用所需插件
rabbitmq-plugins enable rabbitmq_management
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
5,查看已启用插件
rabbitmq-plugins list
l 授权
1, 增加用户账密
rabbitmqctl add_user administrator IMCpwd2019
2, 授权账号管理员权限
rabbitmqctl set_permissions -p '/' administrator ".*" ".*" ".*"
rabbitmqctl set_user_tags administrator administrator
3, 查看用户信息
rabbitmqctl list_users