RabbitMQ Cluster操作

sudo ./rabbitmqctl -n rabbit@ubuntu stop_app

RABBITMQ_NODE_PORT=5672 RABBITMQ_NODENAME=rabbit ./rabbitmq-server -detached
RABBITMQ_NODE_PORT=5673 RABBITMQ_NODENAME=rabbit_1 ./rabbitmq-server -detached
RABBITMQ_NODE_PORT=5674 RABBITMQ_NODENAME=rabbit_2 ./rabbitmq-server -detached

sudo ./rabbitmqctl -n rabbit@ubuntu stop_app

sudo ./rabbitmqctl -n rabbit_1@ubuntu stop_app
sudo ./rabbitmqctl -n rabbit_1@ubuntu reset
./rabbitmqctl -n rabbit_1@ubuntu cluster rabbit@ubuntu rabbit_1@ubuntu
./rabbitmqctl -n rabbit_1@ubuntu start_app

sudo ./rabbitmqctl -n rabbit_2@ubuntu stop_app
sudo ./rabbitmqctl -n rabbit_2@ubuntu reset
sudo ./rabbitmqctl -n rabbit_2@ubuntu cluster rabbit@ubuntu rabbit_1@ubuntu rabbit@ubuntu
./rabbitmqctl -n rabbit_2@ubuntu start_app

你可能感兴趣的:(work)