1 安装erlang
在/etc/yum.repos.d/
目录中添加rabbitmq_erlang.repo文件
1 2
| cd /etc/yum.repos.d sudo vi rabbitmq_erlang.repo
|
在文件中添加
1 2 3 4 5 6 7 8
| # In /etc/yum.repos.d/rabbitmq_erlang.repo [rabbitmq-erlang] name=rabbitmq-erlang baseurl=https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/21/el/7 gpgcheck=1 gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc repo_gpgcheck=0 enabled=1
|
执行安装
2 安装RabbitMQ
1
| rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
|
在/etc/yum.repos.d/
目录中添加rabbitmq_server.repo文件
1 2
| cd /etc/yum.repos.d sudo vi rabbitmq_server.repo
|
在文件中添加
1 2 3 4 5 6 7
| # In /etc/yum.repos.d/rabbitmq_server.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
|
执行安装
1
| sudo yum install rabbitmq-server
|
3 启动
1 2
| sudo chkconfig rabbitmq-server on sudo systemctl start rabbitmq-server.service
|
4 设置账号
1 2 3 4 5 6 7
| $ sudo rabbitmqctl add_user myuser mypassword
$ sudo rabbitmqctl add_vhost myvhost
$ sudo rabbitmqctl set_user_tags myuser mytag
$ sudo rabbitmqctl set_permissions -p myvhost myuser ".*" ".*" ".*"
|