centos 7.3 64
172.18.39.241 k8s-mini-241
172.18.39.242 k8s-mini-242
172.18.39.243 k8s-master-243
vim /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.asc
rpm -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 admin
rabbitmqctl set_user_tags admin administrator
#登陆web
http://172.18.39.243:15672/#/ ##admin / admin
##集群配置
##241 和242服务器分别操作操作:
rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl join_cluster rabbit@k8s-master-243 --ram
rabbitmqctl start_app
rabbitmq-plugins enable rabbitmq_management