1 安装rabbitmq 依赖erlang
官方说明地址:https://github.com/rabbitmq/erlang-rpm
添加yum 仓库源:
In /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/20/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1
2 安装RabbitMQ —运行文件/usr/sbin/ —配置文件/etc/rabbitmq/
官方说明地址:http://www.rabbitmq.com/install-rpm.html
rpm --import https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
this example assumes the CentOS 7 version of the package
yum install rabbitmq-server-3.7.5-1.el7.noarch.rpm
3 启动服务器
安装RabbitMQ服务器软件包时,默认情况下服务器不会作为守护程序启动。在系统引导时默认启动守护进程,如管理员运行
chkconfig rabbitmq-server on
启动关闭
service rabbitmq-server start
service rabbitmq-server stop
4 使用插件
官方说明:http://www.rabbitmq.com/plugins.html
列出插件列表 rabbitmq-plugins list
安装 rabbitmq-plugins enable plugin-name
禁用 rabbitmq-plugins disable plugin-name
启用 rabbitmq-plugins enable rabbitmq_management
http://localhost:15672进行测试,默认的登陆账号为:guest,密码为:guest
5 guest账号无法远程访问
官方说明:http://www.rabbitmq.com/access-control.html
配置rabbitmq.conf
添加 loopback_users = none