RabbitMQ怎么安装配置
这篇文章主要介绍“RabbitMQ怎么安装配置”,在日常操作中,相信很多人在RabbitMQ怎么安装配置问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”RabbitMQ怎么安装配置”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
RabbitMQ 用于在vCloud Director环境中交换消息。
如果您已经安装了 RabbitMQ,请确保将主机配置为支持 SSL 连接。
对于测试和开发环境,您可以选择跳过此过程并按照为测试和开发环境创建容器中的说明让 RabbitMQ 在Docker 容器中运行。
以下是安装和配置 RabbitMQ 主机的过程示例。
下载安装 RabbitMQ
# wget https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el6.x86_64.rpm# rpm -i erlang-18.3-1.el6.x86_64.rpm# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm# rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc# rpm -i rabbitmq-server-3.6.1-1.noarch.rpm
创建自签名证书
# wget https://github.com/michaelklishin/tls-gen/archive/master.zip#解压master.zip# cd tls-get-master/basic
替换vcd-db.gcp.local为您的域:
# CN=vcd-db.gcp.local 密码=vmware make# mv testca/ /etc/rabbitmq/# mv 服务器/ /etc/rabbitmq/# mv 客户端/ /etc/rabbitmq/
集所有者:
# chown -R rabbitmq: /etc/rabbitmq/testca# chown -R rabbitmq: /etc/rabbitmq/server# chown -R rabbitmq: /etc/rabbitmq/client
使用以下内容创建文件/etc/rabbitmq/rabbitmq.config 。
[ {ssl,[{版本,['tlsv1.2','tlsv1.1',tlsv1]}]}, {兔子, [ {ssl_listeners, [5671]}, {ssl_options, [{cacertfile,"/etc/rabbitmq/testca/cacert.pem"}, {certfile,"/etc/rabbitmq/server/cert.pem"}, {keyfile,"/etc/rabbitmq/server/key.pem"}, {版本,['tlsv1.2','tlsv1.1',tlsv1]}, {密码,[“ECDHE-ECDSA-AES256-GCM-SHA384”,“ECDHE-RSA-AES256-GCM-SHA384”, "ECDHE-ECDSA-AES256-SHA384","ECDHE-RSA-AES256-SHA384", "ECDH-ECDSA-AES256-GCM-SHA384","ECDH-RSA-AES256-GCM-SHA384", "ECDH-ECDSA-AES256-SHA384","ECDH-RSA-AES256-SHA384", "DHE-RSA-AES256-GCM-SHA384","DHE-DSS-AES256-GCM-SHA384", "DHE-RSA-AES256-SHA256","DHE-DSS-AES256-SHA256","AES256-GCM-SHA384", "AES256-SHA256","ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES128-SHA256", "ECDHE-RSA-AES128-SHA256","ECDH-ECDSA-AES128-GCM-SHA256", "ECDH-RSA-AES128-GCM-SHA256","ECDH-ECDSA-AES128-SHA256", "ECDH-RSA-AES128-SHA256","DHE-RSA-AES128-GCM-SHA256", “AND-DSS-AES128-GCM-SHA256”、“AND-RSA-AES128-SHA256”、“AND-DSS-AES128-SHA256”、 "AES128-GCM-SHA256","AES128-SHA256","ECDHE-ECDSA-AES256-SHA", "ECDHE-RSA-AES256-SHA","DHE-RSA-AES256-SHA","DHE-DSS-AES256-SHA", "ECDH-ECDSA-AES256-SHA","ECDH-RSA-AES256-SHA","AES256-SHA", "ECDHE-ECDSA-DES-CBC3-SHA","ECDHE-RSA-DES-CBC3-SHA","EDH-RSA-DES-CBC3-SHA", "EDH-DSS-DES-CBC3-SHA","ECDH-ECDSA-DES-CBC3-SHA","ECDH-RSA-DES-CBC3-SHA", "DES-CBC3-SHA","ECDHE-ECDSA-AES128-SHA","ECDHE-RSA-AES128-SHA", "DHE-RSA-AES128-SHA","DHE-DSS-AES128-SHA","ECDH-ECDSA-AES128-SHA", "ECDH-RSA-AES128-SHA","AES128-SHA","EDH-RSA-DES-CBC-SHA","DES-CBC-SHA"]}, {验证,验证_无}, {fail_if_no_peer_cert,false}]}]}].
启动 RabbitMQ
# 服务 rabbitmq-server 启动
启用 RabbitMQ 用户界面
启用 UIhttp://server-name:15672/
# rabbitmq-plugins 启用 rabbitmq_management
创建管理员用户登录:
# rabbitmqctl add_user admin vmware# rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"# rabbitmqctl set_user_tags admin 管理员
到此,关于“RabbitMQ怎么安装配置”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注编程网网站,小编会继续努力为大家带来更多实用的文章!
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341