下载地址:http://www.rabbitmq.com/releases/rabbitmq-server/
找到rabbitmq-server-3.6.15-1.el7.noarch.rpm
第一步 安装 erlang
>yum install erlang -y
第二步 安装 rabbitmq
>yum install rabbitmq-server-3.6.15-1.el7.noarch.rpm -y
查看安装位置
>whereis rabbitmq
进入/usr/lib/rabbitmq/bin/ 目录可以看见
>rabbitmq-server start (用户关闭连接后,自动结束进程) +参数 & 后台启动
注意rabbitmq-server start启动 按Ctrl+C可能造成下次启动失败,需要删除/usr/ rabbitmq/mn/*下面的3个文件
>rabbitmq-server stop 停止
>rabbitmq-server status 查看状态 或者 systemctl status rabbitmq-server
RabbitMQ:使用Web UI
>rabbitmq-plugins enable rabbitmq_management 启动 管理插件默认端口15672
使用guest/guest登入 报错,由于3.3.0版本开始 不允许登入,
新增管理员用户
此时使用admin 123456 登入正常.
使用出现错误User not authorised to access virtual host
设置默认vhost(“/”)访问权限
用户管理
用户管理包括增加用户,删除用户,查看用户列表,修改用户密码。(1) 新增一个用户
rabbitmqctl add_user Username Password
(2) 删除一个用户
rabbitmqctl delete_user Username
(3) 修改用户的密码
rabbitmqctl change_password Username Newpassword
(4) 查看当前用户列表
rabbitmqctl list_users