1.安装erlang
yum install epel-release
yum update
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
yum install erlang
2.安装rabbitmq
安装rabbitmq,centos7和centos6安装的rpm是不同的,centos7因为支持systemd所以安装包不一样。
vim /etc/yum.repos.d/rabbitmq.rep
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/6/
gpgcheck=0
repo_gpgcheck=0
enabled=1
接着执行:
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.9/rabbitmq-server-3.7.9-1.el6.noarch.rpm
yum install rabbitmq-server-3.7.9-1.el6.noarch.rpm
3.rabbitmq一些基本操作
A. rabbitmq-server启动/停止/重启/状态
service rabbitmq-server start
service rabbitmq-server restart
service rabbitmq-server stop
service rabbitmq-server status
B. 启动rabbitmq管理页面
rabbitmq-plugins enable rabbitmq_management
C. 用户相关操作
列出所有用户
rabbitmqctl list_users
为用户guest修改密码
rabbitmqctl change_password guest 123456
新建用户并指定为超级管理员
rabbitmqctl add_user admin 12345678
rabbitmqctl set_user_tags admin administrator
删除用户
rabbitmqctl delete_user Username
网友评论