基础配置:
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
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)