Consul in Linux systems, cluster combat

Source: Internet
Author: User

Consul as a service registration and discovery component of microservices, is a very important part

Currently want to use Consul as the unified management of configuration management

Prepare two machines

11.11.11.10
11.11.11.20

Download Consul Linux version https://www.consul.io/downloads.html

Create folders on two machines, respectively

Mkdir/usr/local/consul/data

Upload Consul.zip and Unzip

Unzip Consul_linux_amd64.zip

Run Consul in 11.11.11.10
sudo./consul agent-server-bootstrap-expect 1-data-dir=data-node=n1-bind=11.11.11.10-client=0.0.0.0 &

Run Consul in 11.11.11.20
sudo./consul agent-data-dir=data-node=n2-bind=11.11.11.20-client=0.0.0.0 &

Run Consul in 11.11.11.10
sudo./consul Join 11.11.11.20

View the situation in the group

./consul Info

./consul Members

Consul in Linux systems, cluster combat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.