Consul叢集部署(Centos環境)
阿新 • • 發佈:2021-07-15
1、Consul安裝
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo sudo yum -y install consul
2、叢集配置命令
consul agent -server -bootstrap -data-dir=/root/consul_data -bind=192.168.49.144 -client=0.0.0.0 -node=192.168.49.144 -ui ###-ui 啟動webui consul agent-client -join=192.168.49.144 -data-dir=/root/consul_data -bind=192.168.49.145 -client=0.0.0.0 -node=192.168.49.145 consul agent -client -join=192.168.49.144 -data-dir=/root/consul_data -bind=192.168.49.147 -client=0.0.0.0 -node=192.168.49.147
PS:注意防火牆(嫌麻煩的可以直接關閉防火牆:systemctl stop firewalld)
[root@minio-0 ~]# consul members
192.168.49.144 192.168.49.144:8301 alive server 1.10.0 2 dc1 <all>
192.168.49.145 192.168.49.145:8301 alive client 1.10.0 2 dc1 <default>
192.168.49.147 192.168.49.147:8301 alive client 1.10.0 2 dc1 <default>