rabbitmq 采用yum安装

Rabbitmq 教程

Rabbitmq 官方文档:http://www.rabbitmq.com/documentation.html
Rabbitmq 下载安装:http://www.rabbitmq.com/download.html
Rabbitmq 使用教程:http://www.rabbitmq.com/getstarted.html
Rabbitmq 博客:http://www.rabbitmq.com/blog/

Rabbitmq 安装

基于epel源,安装Rabbitmq

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

# 安装依赖环境erlang
yum install erlang -y

# 安装rabbitmq
yum install rabbitmq-server -y

Rabbitmq 使用

  • 启动Rabbitmq
/etc/init.d/rabbitmq-server start && chkconfig rabbitmq-server on
  • 查看帮助
rabbitmqctl --help | less
  • 添加用户
rabbitmqctl add_user devops password
  • 查看用户
rabbitmqctl list_users
  • 改变用户密码
rabbitmqctl change_password devops strongpassword
  • 改变用户权限
rabbitmqctl set_user_tags devops administrator
  • 删除用户
rabbitmqctl delete_user devops
  • 使用rabbitmq,添加虚拟主机
rabbitmqctl add_vhost /aniu_vhost
  • 查看虚拟主机
rabbitmqctl list_vhosts
  • 删除虚拟主机
rabbitmqctl delete_vhost /aniu_vhost
  • 给虚拟主机的用户授权
# rabbitmqctl set_permissions [-p vhost] [user] [permission ⇒ (modify) (write) (read)]
rabbitmqctl set_permissions -p /aniu_vhost devops ".*" ".*" ".*"
  • 查看虚拟主机权限
rabbitmqctl list_permissions -p /aniu_vhost
  • 查看用户具体权限
rabbitmqctl list_user_permissions devops
  • 删除权限
rabbitmqctl clear_permissions -p /aniu_vhost devops










配置erlang

# In /etc/yum.repos.d/rabbitmq_erlang.repo
[rabbitmq_erlang]
name=rabbitmq_erlang
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
       https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[rabbitmq_erlang-source]
name=rabbitmq_erlang-source
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
       https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300



参考地址 https://github.com/rabbitmq/erlang-rpm
参考地址  https://cloud.tencent.com/developer/article/1690850


 
posted @ 2021-02-23 11:20  woaibaobei  阅读(465)  评论(0编辑  收藏  举报