企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
【下载链接】 erlang:https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-23.3.4.8-1.el7.x86_64.rpm rabbitMQ:https://packagecloud.io/rabbitmq/rabbitmq-server/packages/el/7/rabbitmq-server-3.9.8-1.el7.noarch.rpm 【安装命令】 ``` # 【安装部分】假设是CentOS 7,去到指定目录: wget --content-disposition https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-23.3.4.8-1.el7.x86_64.rpm/download.rpm:下载erlang wget --content-disposition https://packagecloud.io/rabbitmq/rabbitmq-server/packages/el/7/rabbitmq-server-3.9.8-1.el7.noarch.rpm/download.rpm:下载rabbitmq yum install erlang-23.3.4.8-1.el7.x86_64.rpm:安装erlang erl:测试erlang是否安装成功 yum install rabbitmq-server-3.9.8-1.el7.noarch.rpm:安装rabbitmq systemctl start rabbitmq-server:启动服务 rabbitmq-plugins list:插件列表 rabbitmq-plugins enable rabbitmq_management:启动管理界面 # 【用户部分】 rabbitmqctl list_users:查看用户 rabbitmqctl add_user username password:新增用户名称和密码 rabbitmqctl set_user_tags neo administrator:设置用户角色 rabbitmqctl delete_user username:删除用户 rabbitmqctl change_password username newpassword:修改用户的密码 # 【虚拟空间】 rabbitmqctl list_vhosts:列出虚拟空间 rabbitmqctl add_vhost vhostName:创建虚拟空间 rabbitmqctl set_permissions -p vhostName username '.' '.' '.*' :分配空间权限给用户(配置权限,写权限,读权限) ``` 【命令行】 systemctl start rabbitmq-server:启动rabbitMQ systemctl stop rabbitmq-server:关闭rabbitMQ systemctl restart rabbitmq-server:重启rabbitMQ 【端口】 4369:epmd(Erlang Port Mapper Deamon),erlang服务端口 5672:client端通信口 15672:HTTP API客户端,管理UI(仅在启用了管理插件的情况下) 25672:用于节点间通信(Erlang分发服务器端口) 【启动插件】 rabbitmq-plugins enable rabbitmq_managements ip:15672 查看用户:rabbitmqctl list_users 新增用户:rabbitmqctl add_user username password 设置用户角色:rabbitmqctl set_user_tags username administrator 创建虚拟空间:rabbitmqctl add_vhost order 分配空间权限给用户(配置权限,写权限,读权限): rabbitmqctl set_permissions -p order neo '.*' '.*' '.*' 安装rabbitmq的php扩展 composer require php-amqplib/php-amqplib 阿里云镜像: composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ 【启动延迟插件】 下载网页: https://rabbitmq.com/community-plugins.html https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases 命令行: rabbitmq-plugins enable rabbitmq_delayed_message_exchange