openstack学习之路-集群(rabbitmq)

openstack学习之路-集群(rabbitmq),第1张

openstack学习之路-集群(rabbitmq)

基础配置

rabbitmq  192.168.100.10

rabbitmq2 192.168.100.20

rabbitmq3 192.168.100.30

配置:

Rabbitmq1:

yum install -y rabbitmq-server

  ln -s /usr/lib/rabbitmq/bin/* /usr/bin/

  rabbitmq-plugins list

  systemctl start rabbitmq-server

  systemctl enable rabbitmq-server

  rabbitmqctl start_app

rabbitmq-plugins enable rabbitmq_management

  systemctl restart rabbitmq-server

  yum install -y net-tools

  netstat -ntpl

  rabbitmqctl cluster_status

  systemctl stop rabbitmq-server

  chmod u+w /var/lib/rabbitmq/.erlang.cookie

  systemctl restart rabbitmq-server

  cat /var/lib/rabbitmq/.erlang.cookie

  systemctl status firewalld   查看防火墙状态,开启则关闭

  systemctl stop rabbitmq-server

  cat /var/lib/rabbitmq/.erlang.cookie

      systemctl restart rabbitmq-server

rabbitmq2:

  yum install -y rabbitmq-server

   ln /usr/lib/rabbitmq/bin/* /usr/bin/

   cd /usr/lib/rabbitmq/bin/

   rabbitmq-plugins list

   systemctl start rabbitmq-server

   systemctl enable rabbitmq-server

  rabbitmqctl start_app

  rabbitmq-plugins enable rabbitmq_management

  systemctl restart rabbitmq-server

  yum install -y net-tools

  netstat -ntpl

  rabbitmqctl cluster_status

  systemctl stop rabbitmq-server

  chmod u+w /var/lib/rabbitmq/.erlang.cookie

  systemctl start rabbitmq-server

  cat /var/lib/rabbitmq/.erlang.cooki要和主节点一致,否则copy主节点的配置

  systemctl stop rabbitmq-server

  scp root@rabbitmq:/var/lib/rabbitmq/.erlang.cookie /var/lib/rabbitmq/.erlang.cookie

  cat /var/lib/rabbitmq/.erlang.cookie    

  systemctl start rabbitmq-server

  rabbitmqctl stop_app

  rabbitmqctl join_cluster --ram rabbit @rabbitmq

 --ram  作为内存节点,如果不,去掉--ram

 rabbitmqctl start_app

rabbitmq3:

yum install -y rabbitmq-server

   ln /usr/lib/rabbitmq/bin/* /usr/bin/

   cd /usr/lib/rabbitmq/bin/

   rabbitmq-plugins list

   systemctl start rabbitmq-server

   systemctl enable rabbitmq-server

  rabbitmqctl start_app

  rabbitmq-plugins enable rabbitmq_management

  systemctl restart rabbitmq-server

  yum install -y net-tools

  netstat -ntpl

  rabbitmqctl cluster_status

  systemctl stop rabbitmq-server

  chmod u+w /var/lib/rabbitmq/.erlang.cookie

  systemctl start rabbitmq-server

  cat /var/lib/rabbitmq/.erlang.cooki要和主节点一致,否则copy主节点的配置

  systemctl stop rabbitmq-server

  scp root@rabbitmq:/var/lib/rabbitmq/.erlang.cookie /var/lib/rabbitmq/.erlang.cookie

  cat /var/lib/rabbitmq/.erlang.cookie

  systemctl start rabbitmq-server

  rabbitmqctl stop_app

  rabbitmqctl join_cluster --ram rabbit @rabbitmq

 --ram  作为内存节点,如果不,去掉--ram

rabbitmqctl start_app

rabbitmq:

  rabbitmqctl add_user admin admin

      rabbitmqctl set_user_tags admin administrator

      rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

登录web界面

192.168.100.10:15672

user:admin

login:admin

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5699944.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存