温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

RabbitMQ怎么安装配置

发布时间:2022-09-27 16:26:09 来源:亿速云 阅读:151 作者:iii 栏目:开发技术

这篇文章主要介绍“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怎么安装配置”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI