centos 7.3 64
172.18.39.241 k8s-mini-241
172.18.39.242 k8s-mini-242172.18.39.243 k8s-master-243vim /etc/hosts
yum install -y socat unixODBC unixODBC-devel wxBase wxGTK SDL wxGTK-gl xmlto rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.ascrpm -ivh https://www.rabbitmq.com/releases/erlang/erlang-19.0-1.el7.centos.x86_64.rpm
rpmv -ivh https://dl.bintray.com/rabbitmq/rabbitmq-server-rpm/rabbitmq-server-3.6.14-1.el7.noarch.rpm
#加密文件 都一样必须 权限为400。scp /var/lib/rabbitmq/.erlang.cookie 172.18.39.241:/var/lib/rabbitmq/scp /var/lib/rabbitmq/.erlang.cookie 172.18.39.242:/var/lib/rabbitmq/ #启动服务systemctl start rabbitmq-server ##停止服务systemctl stop rabbitmq-server
rabbitmqctl status
rabbitmq-plugins enable rabbitmq_management rabbitmqctl add_user admin adminrabbitmqctl set_user_tags admin administrator
#登陆webhttp://172.18.39.243:15672/#/ ##admin / admin
##集群配置
##241 和242服务器分别操作操作:
rabbitmqctl stop_app
rabbitmqctl resetrabbitmqctl join_cluster rabbit@k8s-master-243 --ramrabbitmqctl start_apprabbitmq-plugins enable rabbitmq_management