赞
踩
erlang 23.3.4.6
rabbitMQ3.9.13
- mq下载地址:https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.9.13
- erlang下载地址:https://erlang.org/download/otp_versions_tree.html 版本23.3.4.6
- 1.先安装erlang 安装完成后
- 2.使用命令erl 查看是否安装正常 出现Eshell V11.2.2.5 (abort with ^G) 安装正常
- 1.安装rabbitmq-server。
- 2.设置-进入mq的sbin目录
- 开启 rabbitmq_management执行命令:rabbitmq-plugins enable rabbitmq_management
- 查看mq的状态执行命令:rabbitmqctl status
- 添加用户:rabbitmqctl add_user username password
- 为该用户设置权限所有权限:rabbitmqctl set_permissions -p / username ".*" ".*" ".*"
- 设置该用户为管理员角色:rabbitmqctl set_user_tags username administrator
- 查看所有用户:rabbitmqctl list_users
- 3.启动-进入mq的sbin目录
- 运行rabbitmq-server.bat
- 4.进入可视化界面
- http://localhost:15672 用户密码为设置的用户密码
- 下载安装 erlang
- wget https://github.com/rabbitmq/erlang-rpm/releases/download/v23.3.4.6/erlang-23.3.4.6-1.el7.x86_64.rpm
- rpm -ivh erlang-23.3.4.6-1.el7.x86_64.rpm
- #验证是否成功
- erl v
- 下载安装 rabbitMQ
- wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.9.13/rabbitmq-server-3.9.13-1.el7.noarch.rpm
- yum install socat #安装好 socat
- rpm -ivh rabbitmq-server-3.9.13-1.el7.noarch.rpm
-
- rabbitmq 安装目录: /usr/lib/rabbitmq/lib/rabbitmq_server-3.9.13
-
- cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.9.13
-
- # 开机启动
- chkconfig rabbitmq-server on
- /sbin/service rabbitmq-server start
- #停止
- /sbin/service rabbitmq-server stop
-
- # 添加用户和权限
- rabbitmqctl add_user username password
- rabbitmqctl set_permissions -p / username ".*" ".*" ".*"
- rabbitmqctl set_user_tags username administrator
- rabbitmqctl list_users
-
- # 查看插件
- rabbitmq-plugins list
- # 配置客户端插件
- rabbitmq-plugins enable rabbitmq_management
-
- 4.进入可视化界面
- http://IP:15672 用户密码为设置的用户密码
-
- 常用命令
- # 关闭应用
- rabbitmqctl stop_app
- # 启动应用
- rabbitmqctl start_app
- # 节点状态
- rabbitmqctl status
- #集群状态
- rabbitmqctl cluster_status
- # 添加用户密码
- rabbitmqctl add_user admin admin
- # 用户授权
- rabbitmqctl set_user_tags admin administrator
- # 修改用户密码
- rabbitmqctl change_password username password
- # 列出所有用户
- rabbitmqctl list_users
- # 删除用户
- rabbitmqctl delete_user username
- # 列出用户权限
- rabbitmqctl list_user_permissions username
- # 清除用户权限
- rabbitmqctl clear_permissions -p vhostpath username
- # 设置用户权限
- # 三个*对应:configure write read
- rabbitmqctl set_permissions -p vhostpath username ".*" ".*" ".*"
- rabbitmqctl set_permissions -p / ikang".*" ".*" ".*"
- # 列出所有虚拟主机
- rabbitmqctl list_vhosts
- # 创建虚拟主机
- rabbitmqctl add_vhost vhostpath
- # 列出虚拟主机的权限
- rabbitmqctl list_permissions -p vhostpath
- # 删除虚拟主机
- rabbitmqctl delete_vhost vhostpath
- # 查看所有队列
- rabbitmqctl list_queues
- # 清除队列里的消息
- rabbitmqctl -p vhostpath purge_queue queueName
- # 清除所有数据
- rabbitmqctl reset
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。